mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
resolve the case value before checking its type
This commit is contained in:
parent
20eec42a93
commit
f2d097c013
2 changed files with 4 additions and 0 deletions
|
@ -131,6 +131,7 @@ expr_t *new_bind_expr (expr_t *e1, expr_t *e2);
|
|||
expr_t *new_name_expr (const char *name);
|
||||
|
||||
void inc_users (expr_t *e);
|
||||
void convert_name (expr_t *e);
|
||||
|
||||
expr_t *append_expr (expr_t *block, expr_t *e);
|
||||
|
||||
|
|
|
@ -77,7 +77,10 @@ case_label_expr (switch_block_t *switch_block, expr_t *value)
|
|||
if (!cl)
|
||||
Sys_Error ("case_label_expr: Memory Allocation Failure\n");
|
||||
|
||||
if (value)
|
||||
convert_name (value);
|
||||
if (value && value->type < ex_string) {
|
||||
print_expr (value);puts("");
|
||||
error (value, "non-constant case value");
|
||||
free (cl);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue