mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 18:31:27 +00:00
Obtain the label to be removed from the correct place.
This fixes the undetected dead block after "if return else return".
This commit is contained in:
parent
ed901bd48f
commit
f9e177efd6
1 changed files with 4 additions and 4 deletions
|
@ -1001,16 +1001,16 @@ remove_dead_blocks (sblock_t *blocks)
|
|||
|
||||
debug (0, "removing dead block %p", sb);
|
||||
|
||||
sblock->next = sb->next;
|
||||
free_sblock (sb);
|
||||
|
||||
s = (statement_t *) sblock->tail;
|
||||
s = (statement_t *) sb->tail;
|
||||
if (!strcmp (s->opcode, "<GOTO>"))
|
||||
label = s->opa->o.label;
|
||||
else if (!strncmp (s->opcode, "<IF", 3))
|
||||
label = s->opb->o.label;
|
||||
remove_label_from_dest (label);
|
||||
did_something = 1;
|
||||
|
||||
sblock->next = sb->next;
|
||||
free_sblock (sb);
|
||||
}
|
||||
}
|
||||
} while (did_something);
|
||||
|
|
Loading…
Reference in a new issue