diff --git a/sources/strcmp.c b/sources/strcmp.c index 87f9fc4..07db479 100644 --- a/sources/strcmp.c +++ b/sources/strcmp.c @@ -16,9 +16,11 @@ int strcmp(const char *scan1, const char *scan2) #ifdef __OPTIMIZE__ return __inline_strcmp(scan1, scan2); #else + unsigned char c1, c2; + do { - c1 = *scan1++; - c2 = *scan2++; + c1 = (unsigned char) *scan1++; + c2 = (unsigned char) *scan2++; } while (c1 && c1 == c2); return c1 - c2; #endif