mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
fix a sequence point issue that could cause index to be put on the stack
before being initialized
This commit is contained in:
parent
6a687f5e45
commit
68d2167c9e
1 changed files with 2 additions and 1 deletions
|
@ -202,7 +202,8 @@ GIB_Execute (cbuf_t *cbuf)
|
|||
g->waitret = false;
|
||||
if (cbuf->args->argc >= 2 && !strcmp (cbuf->args->argv[1]->str, "=") && ((gib_tree_t *)cbuf->args->argm[1])->delim == ' ') {
|
||||
unsigned int index;
|
||||
GIB_Var_Assign (GIB_Var_Get_Complex (&g->locals, &g->globals, cbuf->args->argv[0]->str, &index, true), index, cbuf->args->argv+2, cbuf->args->argc-2);
|
||||
gib_var_t *var = GIB_Var_Get_Complex (&g->locals, &g->globals, cbuf->args->argv[0]->str, &index, true);
|
||||
GIB_Var_Assign (var, index, cbuf->args->argv+2, cbuf->args->argc-2);
|
||||
}
|
||||
else if ((b = GIB_Builtin_Find (cbuf->args->argv[0]->str))) {
|
||||
b->func ();
|
||||
|
|
Loading…
Reference in a new issue