strxcpyx: do not access dest as an array

dest is a pointer to a string, not an array. Accessing
the "first element" just happens to work, but let's
be more careful.
This commit is contained in:
Mike Yuan
2025-10-25 19:31:06 +02:00
parent f03b49b079
commit a181a9192b
+1 -1
View File
@@ -41,7 +41,7 @@ size_t strnpcpy_full(char **dest, size_t size, const char *src, size_t len, bool
if (ret_truncated)
*ret_truncated = truncated;
*dest[0] = '\0';
(*dest)[0] = '\0';
return size;
}