summaryrefslogtreecommitdiff
path: root/src/user/lib/string
diff options
context:
space:
mode:
authordzwdz2023-06-17 23:41:41 +0200
committerdzwdz2023-06-17 23:41:41 +0200
commit895138e65b90c3f20712b9c31690d84a6aa956ac (patch)
treec3a840f5e41ffdc0fc7725eb839f502f55b01b64 /src/user/lib/string
parentb528a54a708c4cd2149c8e6884af2063c2b272cd (diff)
libc: implement dirent.h
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;