From a33f58cad7e0e24d3beaf82597f1369b7216f3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 7 Jan 2015 19:23:38 +0000 Subject: [PATCH] Fix equality predicate. --- lib/mpi/mpi_cmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mpi/mpi_cmp.c b/lib/mpi/mpi_cmp.c index 40801b6..f8f7d59 100644 --- a/lib/mpi/mpi_cmp.c +++ b/lib/mpi/mpi_cmp.c @@ -99,6 +99,6 @@ int mpi_eq(cryb_mpi *A, cryb_mpi *B) { - return (A->neg == B->neg && A->msb != B->msb && + return (A->neg == B->neg && A->msb == B->msb && memcmp(A->words, B->words, (A->msb + 31) / 32) == 0); }