X-Git-Url: http://git.buserror.net/cgi-bin/gitweb.cgi?p=polintos%2Fscott%2Fpriv.git;a=blobdiff_plain;f=lib%2Fc%2Ffreestanding%2Fstring.c;fp=lib%2Fc%2Ffreestanding%2Fstring.c;h=45eb2463284af43fd33ffe4f043e999dd0069537;hp=04cd22ac9fc74de01d3cec12c3aa65192996cef1;hb=07f827f6957bfb9b3c29f8730670bf1ed51581ff;hpb=371d6008c5366f424e4bf8889febe3cc495d0d3e diff --git a/lib/c/freestanding/string.c b/lib/c/freestanding/string.c index 04cd22a..45eb246 100644 --- a/lib/c/freestanding/string.c +++ b/lib/c/freestanding/string.c @@ -163,7 +163,7 @@ int strncmp(const char *s1, const char *s2, int n) if (i == n) return 0; - return (unsigned char)*s2 - (unsigned char)*s1; + return (unsigned char)s2[i] - (unsigned char)s1[i]; } char *strchr(const char *s, int c)