From aa9917647e1c5d873678ebd8948447e615ddf491 Mon Sep 17 00:00:00 2001 From: Ayush Shukla Date: Tue, 27 Jun 2023 07:53:35 +0200 Subject: [PATCH] fix: add checks to tecurve::is_zero --- noir_stdlib/src/ec/tecurve.nr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noir_stdlib/src/ec/tecurve.nr b/noir_stdlib/src/ec/tecurve.nr index 35e038f45ff..90be8833206 100644 --- a/noir_stdlib/src/ec/tecurve.nr +++ b/noir_stdlib/src/ec/tecurve.nr @@ -235,8 +235,8 @@ mod curvegroup { // Check if zero fn is_zero(self) -> bool { - let Self {x, y, t: _t, z} = self; - (x == 0) & (y == z) + let Self {x, y, t, z} = self; + (x == 0) & (y == z) & (y != 0) & (t == 0) } // Conversion to affine coordinates