From 2d319fdfcb36d53a733293904a5bf42775332fed Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Sun, 16 Sep 2012 21:34:26 +0000
Subject: [PATCH] - Fixed bug in mpi_add_abs with adding a small number to a
large mpi with carry rollover.
---
library/bignum.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/library/bignum.c b/library/bignum.c
index 08cbf8c68..9af6980c6 100644
--- a/library/bignum.c
+++ b/library/bignum.c
@@ -761,7 +761,7 @@ int mpi_add_abs( mpi *X, const mpi *A, const mpi *B )
p = X->p + i;
}
- *p += c; c = ( *p < c ); i++;
+ *p += c; c = ( *p < c ); i++; p++;
}
cleanup: