diff --git a/qloader2.bin b/qloader2.bin index 032989d1..77c0ed6b 100644 Binary files a/qloader2.bin and b/qloader2.bin differ diff --git a/src/lib/libc.c b/src/lib/libc.c index 08ecde55..c8b8e84c 100644 --- a/src/lib/libc.c +++ b/src/lib/libc.c @@ -92,7 +92,7 @@ int strcmp(const char *s1, const char *s2) { for (size_t i = 0; ; i++) { char c1 = s1[i], c2 = s2[i]; if (c1 != c2) - return c1 - c2; + return c1 < c2 ? -1 : 1; if (!c1) return 0; } @@ -102,7 +102,7 @@ int strncmp(const char *s1, const char *s2, size_t n) { for (size_t i = 0; i < n; i++) { char c1 = s1[i], c2 = s2[i]; if (c1 != c2) - return c1 - c2; + return c1 < c2 ? -1 : 1; if (!c1) return 0; }