mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-09 20:11:00 +00:00
eh.. bignum_cmp was broken?
This commit is contained in:
parent
bc54f4b3c2
commit
c7a3bec8b2
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user