projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix broken wmemchr (unbounded search)
[oweals/musl.git]
/
src
/
string
/
wmemchr.c
1
#include <string.h>
2
#include <wchar.h>
3
4
wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n)
5
{
6
for (; n && *s != c; n--, s++);
7
return n ? (wchar_t *)s : 0;
8
}