diff --git a/libc/minilibc/string.c b/libc/minilibc/string.c index e7fc6d400..2de4f2079 100644 --- a/libc/minilibc/string.c +++ b/libc/minilibc/string.c @@ -38,7 +38,7 @@ size_t strlcpy(char *dst, const char *src, size_t siz) register size_t n = siz; /* Copy as many bytes as will fit */ - if (n != 0) + if (n != 0 && --n != 0) { do {