mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Fixed a double free in exp.c, and made math error reports slightly more
useful.
This commit is contained in:
parent
e1b61d2116
commit
73f32465c5
2 changed files with 1 additions and 2 deletions
|
@ -1016,6 +1016,7 @@ Cmd_ProcessMath (dstring_t * dstr)
|
|||
i += strlen (temp) - 1;
|
||||
} else {
|
||||
ret = -2;
|
||||
Cmd_Error (va("Math error: invalid expression %s\n", statement->str));
|
||||
break; // Math evaluation error
|
||||
}
|
||||
}
|
||||
|
@ -1153,7 +1154,6 @@ Cmd_TokenizeString (const char *text, qboolean filter)
|
|||
return;
|
||||
}
|
||||
if (res == -2) {
|
||||
Cmd_Error ("Math error: Invalid math expression\n");
|
||||
cmd_activebuffer->argc = 0;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -272,7 +272,6 @@ exp_error_t EXP_Validate (token *chain)
|
|||
EXP_InsertTokenAfter (cur, new);
|
||||
}
|
||||
else
|
||||
EXP_DestroyTokens (chain);
|
||||
return EXP_E_SYNTAX; /* Operator misuse */
|
||||
}
|
||||
else if (cur->generic.type == TOKEN_NUM && cur->generic.next->generic.type == TOKEN_NUM)
|
||||
|
|
Loading…
Reference in a new issue