mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Update label destination when moving labels.
This fixes a segfault when optimizing the empty-body test. The label was getting moved, but the statement block to which it pointed was not updated and thus it pointed to dead data.
This commit is contained in:
parent
d54ee6c8c3
commit
431074d58f
1 changed files with 4 additions and 1 deletions
|
@ -1308,8 +1308,11 @@ move_labels (sblock_t *dst, sblock_t *src)
|
|||
|
||||
if (!src_labels)
|
||||
return;
|
||||
while (src_labels->next)
|
||||
src_labels->dest = dst;
|
||||
while (src_labels->next) {
|
||||
src_labels = src_labels->next;
|
||||
src_labels->dest = dst;
|
||||
}
|
||||
src_labels->next = dst->labels;
|
||||
dst->labels = src->labels;
|
||||
src->labels = 0;
|
||||
|
|
Loading…
Reference in a new issue