X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fstring%2Fstrlcpy.c;fp=src%2Fstring%2Fstrlcpy.c;h=4d3ff92a8d79997c139b8a0eaaaefe54e5b7a2e6;hp=6aeb106aa2e032c4d392631bb8fa9dd8a9f2e8bb;hb=820fccdefe3774d2902f0191966a5c2848405faa;hpb=8442358d9dfc78261a5eab1f2cb13861c6e13207 diff --git a/src/string/strlcpy.c b/src/string/strlcpy.c index 6aeb106a..4d3ff92a 100644 --- a/src/string/strlcpy.c +++ b/src/string/strlcpy.c @@ -16,7 +16,7 @@ size_t strlcpy(char *d, const char *s, size_t n) const size_t *ws; if (!n--) goto finish; - if (((uintptr_t)s & ALIGN) != ((uintptr_t)d & ALIGN)) { + if (((uintptr_t)s & ALIGN) == ((uintptr_t)d & ALIGN)) { for (; ((uintptr_t)s & ALIGN) && n && (*d=*s); n--, s++, d++); if (n && *s) { wd=(void *)d; ws=(const void *)s;