mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
return -1
This commit is contained in:
parent
a0a9e533cf
commit
f4542adc8b
4 changed files with 22 additions and 59 deletions
|
@ -1234,11 +1234,9 @@ int bignum_cmp(string a, string b) {
|
|||
// allocating a local variable to "cache" it
|
||||
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;
|
||||
if (a[i] > b[i]) return 1;
|
||||
if (a[i] < b[i]) return -1;
|
||||
}
|
||||
for (i=0; i<strlen(a); i++) if (a[i] == b[i]) continue;
|
||||
if (a[i] > b[i]) return 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif // __PIKE__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue