From: Chris Duncan Date: Sun, 16 Aug 2026 07:09:49 +0000 (-0700) Subject: Expand to signed int to return -1 as libsodium instead of 255. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=1830940c4c163fc55e9a036517e5b739ba16a66a;p=nano25519.git Expand to signed int to return -1 as libsodium instead of 255. --- diff --git a/src/assembly/ge.ts b/src/assembly/ge.ts index 439f728..1be4e37 100644 --- a/src/assembly/ge.ts +++ b/src/assembly/ge.ts @@ -143,7 +143,7 @@ export function ge_frombytes (h: ge_p3, s: StaticArray): i32 { fe_cmov(h.X, negx, fe_isnegative(h.X) ^ (s[31] >> 7)) fe_mul(h.T, h.X, h.Y) - return (has_m_root | has_p_root) - 1 + return i32(has_m_root | has_p_root) - 1 } const ge_has_small_order_y_sqrtm1: FieldElement = fe()