mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
avoid a buffer underflow
This commit is contained in:
parent
63f9c77e11
commit
b2a6a20426
1 changed files with 2 additions and 1 deletions
|
@ -76,7 +76,8 @@ GIB_Exec_Override_f (void)
|
|||
if (!Cvar_Command ()
|
||||
&& (cmd_warncmd->int_val || (developer && developer->int_val)))
|
||||
Sys_Printf ("execing %s\n", Cmd_Argv (1));
|
||||
if (!strcmp (Cmd_Argv (1) + strlen (Cmd_Argv (1)) - 4, ".gib")
|
||||
if ((strlen (Cmd_Argv (1)) >= 4
|
||||
&& !strcmp (Cmd_Argv (1) + strlen (Cmd_Argv (1)) - 4, ".gib"))
|
||||
|| cbuf_active->interpreter == GIB_Interpreter ()) {
|
||||
// GIB script, put it in a new buffer on the stack
|
||||
cbuf_t *sub = Cbuf_PushStack (GIB_Interpreter ());
|
||||
|
|
Loading…
Reference in a new issue