fixing a bug in character-number comparison
This commit is contained in:
parent
3f4b26a46f
commit
3d25a1a672
|
@ -79,10 +79,13 @@ static value_t bounded_compare(value_t a, value_t b, int bound, int eq)
|
|||
return bounded_vector_compare(a, b, bound, eq);
|
||||
break;
|
||||
case TAG_CPRIM:
|
||||
if (cp_class((cprim_t*)ptr(a)) == wchartype &&
|
||||
(!iscprim(b) ||
|
||||
cp_class((cprim_t*)ptr(b)) != wchartype))
|
||||
return fixnum(-1);
|
||||
if (cp_class((cprim_t*)ptr(a)) == wchartype) {
|
||||
if (!iscprim(b) || cp_class((cprim_t*)ptr(b)) != wchartype)
|
||||
return fixnum(-1);
|
||||
}
|
||||
else if (iscprim(b) && cp_class((cprim_t*)ptr(b)) == wchartype) {
|
||||
return fixnum(1);
|
||||
}
|
||||
c = numeric_compare(a, b, eq, 1, NULL);
|
||||
if (c != 2)
|
||||
return fixnum(c);
|
||||
|
|
Loading…
Reference in New Issue