eh.. bignum_cmp was broken?

This commit is contained in:
psyc://psyced.org/~lynX 2011-08-24 13:31:05 +02:00
parent bc54f4b3c2
commit c7a3bec8b2

View File

@ -1053,7 +1053,7 @@ int bignum_cmp(string a, string b) {
// allocating a local variable to "cache" it // allocating a local variable to "cache" it
if (strlen(a) > strlen(b)) return 1; if (strlen(a) > strlen(b)) return 1;
if (strlen(a) < strlen(b)) return -1; if (strlen(a) < strlen(b)) return -1;
for (i=0; i<strlen(a); i++) if (a[i] == b[i]) continue; for (i=0; i<strlen(a); i++) if (a[i] == b[i]) break;
if (a[i] > b[i]) return 1; if (a[i] > b[i]) return 1;
return -1; return -1;
} }