bn_restore_invariant (and the many loops that duplicate it) leaves a
single zero word in a bignum representing 0, whereas the constant
'Zero' does not have any data words at all. Cope with this in
bignum_cmp.
(It would be a better plan to decide on one representation and stick
with it, but this is the less disruptive fix for the moment.)
git-svn-id: svn://svn.tartarus.org/sgt/putty@9996
cda61777-01e9-0310-a592-
d414129be87e
int amax = a[0], bmax = b[0];
int i;
+ /* Annoyingly we have two representations of zero */
+ if (amax == 1 && a[amax] == 0)
+ amax = 0;
+ if (bmax == 1 && b[bmax] == 0)
+ bmax = 0;
+
assert(amax == 0 || a[amax] != 0);
assert(bmax == 0 || b[bmax] != 0);