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);
|
return bounded_vector_compare(a, b, bound, eq);
|
||||||
break;
|
break;
|
||||||
case TAG_CPRIM:
|
case TAG_CPRIM:
|
||||||
if (cp_class((cprim_t*)ptr(a)) == wchartype &&
|
if (cp_class((cprim_t*)ptr(a)) == wchartype) {
|
||||||
(!iscprim(b) ||
|
if (!iscprim(b) || cp_class((cprim_t*)ptr(b)) != wchartype)
|
||||||
cp_class((cprim_t*)ptr(b)) != wchartype))
|
return fixnum(-1);
|
||||||
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);
|
c = numeric_compare(a, b, eq, 1, NULL);
|
||||||
if (c != 2)
|
if (c != 2)
|
||||||
return fixnum(c);
|
return fixnum(c);
|
||||||
|
|
Loading…
Reference in New Issue