summaryrefslogtreecommitdiff
path: root/src/user/lib/string
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/string')
-rw-r--r--src/user/lib/string/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/user/lib/string/string.c b/src/user/lib/string/string.c
index 68c4826..c65d7c5 100644
--- a/src/user/lib/string/string.c
+++ b/src/user/lib/string/string.c
@@ -5,7 +5,7 @@
#include <strings.h>
char *strchr(const char *s, int c) {
- for (; *s; s++) {
+ for (; *s || c == 0; s++) {
if (*s == c) return (char *)s;
}
return NULL;