forked from Vhex-Kernel-Core/fxlibc
Update 'src/string/strncmp.c'
This commit is contained in:
parent
ddec761f61
commit
ee42660ea5
|
@ -7,5 +7,5 @@ int strncmp(const char *s1, const char *s2, size_t n)
|
|||
size_t i = -1;
|
||||
while (++i < n - 1 && s1[i] != '\0' && s2[i] != '\0'
|
||||
&& s1[i] == s2[i]) ;
|
||||
return (s1[i] - s2[i]);
|
||||
return ((unsigned char) s1[i] - (unsigned char) s2[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue