diff options
author | dzwdz | 2023-06-17 23:41:41 +0200 |
---|---|---|
committer | dzwdz | 2023-06-17 23:41:41 +0200 |
commit | 895138e65b90c3f20712b9c31690d84a6aa956ac (patch) | |
tree | c3a840f5e41ffdc0fc7725eb839f502f55b01b64 /src/user/lib/string | |
parent | b528a54a708c4cd2149c8e6884af2063c2b272cd (diff) |
libc: implement dirent.h
Diffstat (limited to 'src/user/lib/string')
-rw-r--r-- | src/user/lib/string/string.c | 2 |
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; |