X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstring%2Fwcsncat.c;h=9d61bbbd61cecfb5d69a623ded1f751d6a5d1d84;hb=28c5d46d844684feba2ddfc9027ea308d8d3612c;hp=b07abe455b23c5fe1bf36e7a3dba1250edae88ad;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/string/wcsncat.c b/src/string/wcsncat.c index b07abe45..9d61bbbd 100644 --- a/src/string/wcsncat.c +++ b/src/string/wcsncat.c @@ -4,7 +4,7 @@ wchar_t *wcsncat(wchar_t *d, const wchar_t *s, size_t n) { wchar_t *a = d; d += wcslen(d); - while (n && (*d++ = *s++)) n--; + while (n && *s) n--, *d++ = *s++; *d++ = 0; return a; }