mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #3812 from charlottia/iterator-invalidation
proc_prune: avoid using invalidated iterator
This commit is contained in:
commit
51e627686a
|
@ -91,7 +91,7 @@ struct PruneWorker
|
|||
if (GetSize(new_lhs) == 0) {
|
||||
if (GetSize(conn_lhs) == 0)
|
||||
removed_count++;
|
||||
cs->actions.erase((it++).base() - 1);
|
||||
it = decltype(cs->actions)::reverse_iterator(cs->actions.erase(it.base() - 1));
|
||||
} else {
|
||||
it->first = new_lhs;
|
||||
it->second = new_rhs;
|
||||
|
|
Loading…
Reference in New Issue