fixed bug in testcase reported by martins.mozeiko@gmail.com

This commit is contained in:
Steffen Jaeckel 2011-03-27 19:57:48 +02:00
parent 1e90accef6
commit da5fa59f2c

View File

@ -27,7 +27,7 @@ void s_fp_sub(fp_int *a, fp_int *b, fp_int *c)
for (; x < a->used; x++) {
t = ((fp_word)a->dp[x]) - t;
c->dp[x] = (fp_digit)t;
t = (t >> DIGIT_BIT);
t = (t >> DIGIT_BIT)&1;
}
for (; x < oldused; x++) {
c->dp[x] = 0;