projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
New module 'unicase/u16-is-lowercase'.
[pspp]
/
lib
/
strchrnul.c
diff --git
a/lib/strchrnul.c
b/lib/strchrnul.c
index 0902c18dd4b79ac1a0b927b6e9e8d750b6173825..5ed237c3e0f415ea7139f59e66e157e562d27352 100644
(file)
--- a/
lib/strchrnul.c
+++ b/
lib/strchrnul.c
@@
-37,6
+37,8
@@
strchrnul (const char *s, int c_in)
unsigned char c;
c = (unsigned char) c_in;
+ if (!c)
+ return rawmemchr (s, 0);
/* Handle the first few bytes by reading one byte at a time.
Do this until CHAR_PTR is aligned on a longword boundary. */