Shader Decompiler: Fix dangerous behavior of invalid iterator insertion.
This commit is contained in:
parent
359f22b808
commit
a283eda320
|
@ -964,9 +964,9 @@ private:
|
||||||
demote_endif_node.type = Type::EndIf;
|
demote_endif_node.type = Type::EndIf;
|
||||||
demote_endif_node.data.end_if.merge = return_block_it->data.block;
|
demote_endif_node.data.end_if.merge = return_block_it->data.block;
|
||||||
|
|
||||||
asl.insert(return_block_it, demote_endif_node);
|
const auto next_it_1 = asl.insert(return_block_it, demote_endif_node);
|
||||||
asl.insert(return_block_it, demote_node);
|
const auto next_it_2 = asl.insert(next_it_1, demote_node);
|
||||||
asl.insert(return_block_it, demote_if_node);
|
asl.insert(next_it_2, demote_if_node);
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectPool<Statement>& stmt_pool;
|
ObjectPool<Statement>& stmt_pool;
|
||||||
|
|
Reference in New Issue