diff options
author | jbj <devnull@localhost> | 2003-06-02 17:01:41 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2003-06-02 17:01:41 +0000 |
commit | c3d235daaf15afad506160cade5e52ed6939b454 (patch) | |
tree | cb262551151503451eb46fae391a3c2cc2b3cf94 /beecrypt/mp.c | |
parent | 3ea8d7b1979c3bb88bffece0087f858b7a4678a7 (diff) | |
download | librpm-tizen-c3d235daaf15afad506160cade5e52ed6939b454.tar.gz librpm-tizen-c3d235daaf15afad506160cade5e52ed6939b454.tar.bz2 librpm-tizen-c3d235daaf15afad506160cade5e52ed6939b454.zip |
Yet another beecrypt-3.0.0 merge.
CVS patchset: 6882
CVS date: 2003/06/02 17:01:41
Diffstat (limited to 'beecrypt/mp.c')
-rw-r--r-- | beecrypt/mp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/beecrypt/mp.c b/beecrypt/mp.c index b4685f055..03c0945f0 100644 --- a/beecrypt/mp.c +++ b/beecrypt/mp.c @@ -1028,7 +1028,7 @@ size_t mprshiftlsz(size_t size, mpw* data) /* count 'all zero' words and move src pointer */ while (size--) { - /* test if we a non-zero word */ + /* test if we have a non-zero word */ if ((carry = *(slide--))) { /* count 'least signification zero bits and set zbits counter */ @@ -1042,6 +1042,9 @@ size_t mprshiftlsz(size_t size, mpw* data) zwords++; } + if ((rbits == 0) && (zwords == 0)) + return 0; + /* shouldn't happen, but let's test anyway */ if (size == 0) return 0; @@ -1096,7 +1099,6 @@ void mpgcd_w(size_t size, const mpw* xdata, const mpw* ydata, mpw* result, mpw* /* get the smallest returned values, and set shift to that */ shift = mprshiftlsz(size, wksp); - temp = mprshiftlsz(size, result); if (shift > temp) |