mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
Fixed -1 in Lcompare
This commit is contained in:
parent
b8660e1c02
commit
37b1e274a5
1 changed files with 2 additions and 2 deletions
|
|
@ -643,7 +643,7 @@ extern aint Lcompare (void *p, void *q) {
|
|||
|
||||
if (UNBOXED(p)) {
|
||||
if (UNBOXED(q)) return BOX(UNBOX(p) - UNBOX(q));
|
||||
else return BOX(-1u);
|
||||
else return BOX(-1);
|
||||
} else if (UNBOXED(q)) return BOX(1);
|
||||
else {
|
||||
if (is_valid_heap_pointer(p)) {
|
||||
|
|
@ -687,7 +687,7 @@ extern aint Lcompare (void *p, void *q) {
|
|||
if (c != BOX(0)) return c;
|
||||
}
|
||||
return BOX(0);
|
||||
} else return BOX(-1u);
|
||||
} else return BOX(-1);
|
||||
} else if (is_valid_heap_pointer(q)) return BOX(1);
|
||||
else return BOX(p - q);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue