From cd4198c84d7f908248450fcf111bcb248c57cd2f Mon Sep 17 00:00:00 2001 From: slimgotomoon <108471212+slimgotomoon@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:29:22 +0800 Subject: [PATCH] fix bug --- ecdsa.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecdsa.go b/ecdsa.go index 6f5ef48..1d582e6 100644 --- a/ecdsa.go +++ b/ecdsa.go @@ -380,7 +380,7 @@ func Add(point1, point2 []byte, name string) (point []byte, isinfinity bool) { return nil, false } - if x_big.Cmp(big.NewInt(0)) == 0 && x_big.Cmp(big.NewInt(0)) == 0 { + if x_big.Cmp(big.NewInt(0)) == 0 && y_big.Cmp(big.NewInt(0)) == 0 { return nil, true } @@ -446,4 +446,4 @@ func Mul(pointin, scalar []byte, name string) (point []byte, isinfinity bool) { y = append([]byte{0x00}, y...) } return append(x, y...), false -} \ No newline at end of file +}