mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-11 03:13:06 +00:00
Add the missing jump from after the actual last case
This commit is contained in:
parent
986d58877f
commit
5c52e817ea
1 changed files with 8 additions and 0 deletions
8
ast.c
8
ast.c
|
@ -2367,6 +2367,14 @@ bool ast_switch_codegen(ast_switch *self, ast_function *func, bool lvalue, ir_va
|
|||
}
|
||||
}
|
||||
|
||||
/* Jump from the last bnot to bout */
|
||||
if (bfall && !bfall->final && !ir_block_create_jump(bfall, bout)) {
|
||||
/*
|
||||
astwarning(ast_ctx(bfall), WARN_???, "missing break after last case");
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
|
||||
/* If there was a default case, put it down here */
|
||||
if (def_case) {
|
||||
ir_block *bcase;
|
||||
|
|
Loading…
Reference in a new issue