pull/1/merge
Mr.w 2024-10-22 17:37:44 -04:00 committed by GitHub
commit cb44106680
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ char* FAST_FUNC safe_strncpy(char *dst, const char *src, size_t size)
{
if (!size) return dst;
dst[--size] = '\0';
return strncpy(dst, src, size);
return strncpy(dst, src, --size);
}
/* Like strcpy but can copy overlapping strings. */