Replace strncpy usage with Q_strncpyz

This commit is contained in:
Zack Middleton authored and Tim Angus committed 2025-07-24 09:47:13 +01:00
1 parent c8553223ec
commit 1132abe3dc
10 files changed
+16 -34

No files matched your search

+1 -3
View File
@@ -221,9 +221,7 @@ int ReadString(source_t *source, fielddef_t *fd, void *p)
//remove the double quotes
StripDoubleQuotes(token.string);
//copy the string
strncpy((char *) p, token.string, MAX_STRINGFIELD-1);
//make sure the string is closed with a zero
((char *)p)[MAX_STRINGFIELD-1] = '\0';
Q_strncpyz((char *) p, token.string, MAX_STRINGFIELD);
//
return 1;
} //end of the function ReadString