mirror of
https://github.com/ioquake/ioq3.git
synced 2025-06-02 09:51:21 +00:00
Fix strncpy usage in botlib
All usage of strncpy in botlib should now either set string terminator or use Q_strncpyz.
This commit is contained in:
parent
8956ab41dd
commit
c12b81a273
8 changed files with 13 additions and 14 deletions
|
@ -1323,7 +1323,7 @@ define_t *PC_DefineFromString(char *string)
|
|||
script = LoadScriptMemory(string, strlen(string), "*extern");
|
||||
//create a new source
|
||||
Com_Memset(&src, 0, sizeof(source_t));
|
||||
strncpy(src.filename, "*extern", sizeof(src.filename) - 1);
|
||||
Q_strncpyz(src.filename, "*extern", sizeof(src.filename));
|
||||
src.scriptstack = script;
|
||||
#if DEFINEHASHING
|
||||
src.definehash = GetClearedMemory(DEFINEHASHSIZE * sizeof(define_t *));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue