mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-01 21:40:43 +00:00
buf[sizeof(buf)] = 0; is bad. buf[sizeof(buf) - 1] = 0; is good.
(this is in net_svc too)
This commit is contained in:
parent
6b10cb7c4b
commit
15f7173ddd
1 changed files with 1 additions and 1 deletions
|
@ -837,7 +837,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