X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstring%2Fstpncpy.c;h=a04cdce8f9214acf293352f2f61267567a700c1a;hb=3e082df3cc4c287f659e9067b2b23c7db0855695;hp=473db17e9cd1c6682f0846731684537248864a81;hpb=9f19b3ec8dec1e9402e31172a74b72cd46d3da36;p=musl diff --git a/src/string/stpncpy.c b/src/string/stpncpy.c index 473db17e..a04cdce8 100644 --- a/src/string/stpncpy.c +++ b/src/string/stpncpy.c @@ -19,7 +19,7 @@ char *__stpncpy(char *d, const char *s, size_t n) if (!n || !*s) goto tail; wd=(void *)d; ws=(const void *)s; for (; n>=sizeof(size_t) && !HASZERO(*ws); - n-=sizeof(size_t), ws++, *wd++) *wd = *ws; + n-=sizeof(size_t), ws++, wd++) *wd = *ws; d=(void *)wd; s=(const void *)ws; } for (; n && (*d=*s); n--, s++, d++);