diff --git a/libs/util/cmd.c b/libs/util/cmd.c index f5396bc0f..8e9c926b2 100644 --- a/libs/util/cmd.c +++ b/libs/util/cmd.c @@ -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; } diff --git a/libs/util/exp.c b/libs/util/exp.c index bca1a881a..42292c37b 100644 --- a/libs/util/exp.c +++ b/libs/util/exp.c @@ -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)