From 58bb87e6265053c0d5e68b6a5ff8a5df70e75a83 Mon Sep 17 00:00:00 2001 From: OpenClaw Date: Tue, 24 Mar 2026 17:05:18 -0500 Subject: [PATCH 1/2] DRV-16: Replace math.pow with ^ operator for Lua 5.3+ compatibility math.pow was removed in Lua 5.3. Use the ^ operator instead, which works across all Lua versions (5.1+, LuaJIT). --- src/noiseprotocol/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/noiseprotocol/init.lua b/src/noiseprotocol/init.lua index 72fef3d..439e3b8 100644 --- a/src/noiseprotocol/init.lua +++ b/src/noiseprotocol/init.lua @@ -181,7 +181,7 @@ function CipherSuite:new(dh, cipher, hash) end -- Protocol constants -local MAX_NONCE = math.pow(2, 32) - 1 +local MAX_NONCE = 2^32 - 1 --- X25519 Diffie-Hellman implementation --- @type DHFunction From 3d3ff26a5f70d70e4185340fdec321a2e2968dcd Mon Sep 17 00:00:00 2001 From: OpenClaw Date: Tue, 24 Mar 2026 17:09:33 -0500 Subject: [PATCH 2/2] style: fix stylua formatting for exponent operator --- src/noiseprotocol/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/noiseprotocol/init.lua b/src/noiseprotocol/init.lua index 439e3b8..c48a078 100644 --- a/src/noiseprotocol/init.lua +++ b/src/noiseprotocol/init.lua @@ -181,7 +181,7 @@ function CipherSuite:new(dh, cipher, hash) end -- Protocol constants -local MAX_NONCE = 2^32 - 1 +local MAX_NONCE = 2 ^ 32 - 1 --- X25519 Diffie-Hellman implementation --- @type DHFunction