Fix warning.

This commit is contained in:
Victor M. Alvarez
2020-02-18 12:13:52 +01:00
parent a3701f510c
commit ef26b5d32e
+3 -4
View File
@@ -89,10 +89,9 @@ SIZED_STRING* sized_string_new(
result->length = length;
result->flags = 0;
strncpy(result->c_string, s, length);
result->c_string[length] = '\0';
// Copy the string and the null terminator.
strcpy(result->c_string, s);
return result;
}