diff options
Diffstat (limited to 'crypto/bn/bn_div.c')
-rw-r--r-- | crypto/bn/bn_div.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c index 2e600c7c54..64b84ac1a7 100644 --- a/crypto/bn/bn_div.c +++ b/crypto/bn/bn_div.c @@ -241,6 +241,8 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor, } else res->top--; + if (res->top == 0) + res->neg = 0; resp--; for (i=0; i<loop-1; i++) |