summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/string/wmemchr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/wmemchr.c b/src/string/wmemchr.c
index a3ee0e61..37d69629 100644
--- a/src/string/wmemchr.c
+++ b/src/string/wmemchr.c
@@ -3,6 +3,6 @@
wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n)
{
- for (; n && *s != c; s++);
+ for (; n && *s != c; n--, s++);
return n ? (wchar_t *)s : 0;
}