diff options
Diffstat (limited to 'src/common/libc')
-rw-r--r-- | src/common/libc/string.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/libc/string.c b/src/common/libc/string.c index e5f7a53..82c290f 100644 --- a/src/common/libc/string.c +++ b/src/common/libc/string.c @@ -64,6 +64,7 @@ int strncmp(const char *s1, const char *s2, size_t n) { s2++; i++; } + if (i == n) return 0; return (*(unsigned char*)s1 - *(unsigned char*)s2); } |