summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/string/wcsncat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/string/wcsncat.c b/lib/libc/string/wcsncat.c
index 44f1ff98980c..5a243477db5b 100644
--- a/lib/libc/string/wcsncat.c
+++ b/lib/libc/string/wcsncat.c
@@ -48,7 +48,7 @@ wcsncat(wchar_t * __restrict s1, const wchar_t * __restrict s2, size_t n)
p++;
q = p;
r = s2;
- while (*r && n) {
+ while (n && *r) {
*q++ = *r++;
n--;
}