mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
buf[sizeof(buf)] = 0; is bad. buf[sizeof(buf) - 1] = 0; is good.
This commit is contained in:
parent
f6ef79b7e3
commit
7c6765df60
1 changed files with 1 additions and 1 deletions
|
@ -848,7 +848,7 @@ Cmd_ExecuteString (const char *text, cmd_source_t src)
|
|||
char buf2[1024];
|
||||
|
||||
strncpy(buf, text, sizeof(buf) - 1);
|
||||
buf[sizeof(buf)] = 0;
|
||||
buf[sizeof(buf) - 1] = 0;
|
||||
Cmd_ParseSpecial (buf);
|
||||
Cmd_ExpandVariables (buf, buf2);
|
||||
Cmd_TokenizeString (buf2);
|
||||
|
|
Loading…
Reference in a new issue