zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 98b10d94bf88a7e07690663008eb3f3dc8bfceca (tree)
parent 25515980134ce457dad0a8cefa3f2d458e4163f7
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Mon, 21 Jun 2021 12:40:27 -0700

std.crypto.p256: fix neg function compile error

There was a typo here and the neg function referenced a non-existent
variable.

Diffstat:
Mlib/std/crypto/pcurves/p256/scalar.zig | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/std/crypto/pcurves/p256/scalar.zig b/lib/std/crypto/pcurves/p256/scalar.zig @@ -63,8 +63,7 @@ pub fn add(a: CompressedScalar, b: CompressedScalar, endian: builtin.Endian) Non /// Return -s (mod L) pub fn neg(s: CompressedScalar, endian: builtin.Endian) NonCanonicalError!CompressedScalar { - _ = s; - return (try Scalar.fromBytes(a, endian)).neg().toBytes(endian); + return (try Scalar.fromBytes(s, endian)).neg().toBytes(endian); } /// Return (a-b) (mod L)