diff options
Diffstat (limited to 'lib/libc/string')
-rw-r--r-- | lib/libc/string/memchr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/string/memchr.c b/lib/libc/string/memchr.c index 6d7c2fd..d98d853 100644 --- a/lib/libc/string/memchr.c +++ b/lib/libc/string/memchr.c @@ -45,7 +45,7 @@ memchr(const void *s, int c, size_t n) const unsigned char *p = s; do { - if (*p++ == c) + if (*p++ == (unsigned char)c) return ((void *)(p - 1)); } while (--n != 0); } |