diff --git a/lang/cem/libcc.ansi/string/memcmp.c b/lang/cem/libcc.ansi/string/memcmp.c index 93b97e72e..f7295f071 100644 --- a/lang/cem/libcc.ansi/string/memcmp.c +++ b/lang/cem/libcc.ansi/string/memcmp.c @@ -9,13 +9,13 @@ int memcmp(const void *s1, const void *s2, size_t n) { - register const char *p1 = s1, *p2 = s2; + register const unsigned char *p1 = s1, *p2 = s2; if (n) { n++; while (--n > 0) { if (*p1++ == *p2++) continue; - return (unsigned char) *--p1 - (unsigned char) *--p2; + return *--p1 - *--p2; } } return 0;