fix hash-table sorting of symbols with non-ASCII characters

Non-ASCII characters sorted before ASCII characters, instead of after.
This commit is contained in:
Matthew Flatt 2019-03-12 18:23:56 -06:00
parent 6d9ea44830
commit 4248f9bea0

View File

@ -57,7 +57,7 @@ static int compare_sym_likes(Scheme_Object *a, Scheme_Object *b)
for (i = 0; i < l; i++) {
if (SCHEME_SYM_VAL(a)[i] != SCHEME_SYM_VAL(b)[i])
return (SCHEME_SYM_VAL(a)[i] - SCHEME_SYM_VAL(b)[i]);
return (((unsigned char *)SCHEME_SYM_VAL(a))[i] - ((unsigned char *)SCHEME_SYM_VAL(b))[i]);
}
return SCHEME_SYM_LEN(a) - SCHEME_SYM_LEN(b);