Use strlcpy() in !localized case to avoid the -1's.
This commit is contained in:
parent
0ea291e221
commit
f53577c0d4
@ -51,8 +51,7 @@ strxfrm(char * __restrict dest, const char * __restrict src, size_t len)
|
||||
if (slen < len)
|
||||
strcpy(dest, src);
|
||||
else {
|
||||
strncpy(dest, src, len - 1);
|
||||
dest[len - 1] = '\0';
|
||||
strlcpy(dest, src, len);
|
||||
}
|
||||
}
|
||||
return slen;
|
||||
|
Loading…
x
Reference in New Issue
Block a user