mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Don't create default_expr unless needed.
The goto for the default expression is the source of the mis-counted label users: the label was being counted by the goto, but the goto was never being inserted into the code (only v6 progs or "difficult" types insert the goto).
This commit is contained in:
parent
d0e56c91cc
commit
f6e5428382
1 changed files with 1 additions and 1 deletions
|
@ -395,7 +395,6 @@ switch_expr (switch_block_t *switch_block, expr_t *break_label,
|
|||
default_label = &_default_label;
|
||||
default_label->label = break_label;
|
||||
}
|
||||
default_expr = goto_expr (default_label->label);
|
||||
|
||||
append_expr (sw, assign_expr (sw_val, switch_block->test));
|
||||
|
||||
|
@ -412,6 +411,7 @@ switch_expr (switch_block_t *switch_block, expr_t *break_label,
|
|||
|
||||
append_expr (sw, test);
|
||||
}
|
||||
default_expr = goto_expr (default_label->label);
|
||||
append_expr (sw, default_expr);
|
||||
} else {
|
||||
expr_t *temp;
|
||||
|
|
Loading…
Reference in a new issue