aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-07-06 12:43:48 +0100
committerGitHub <noreply@github.com>2021-07-06 12:43:48 +0100
commit5b2db015a9fb27f9af9a1ce4a2f7b186fb56ea03 (patch)
tree38d08f59267dc3bdc4950197f30ff91a5b407f43 /common
parentc0bb2fb76a700a1ff3b9aaa663cfd70194df2a3a (diff)
parent3d0facf1192ca38e5326ff088c585dfc86b63dc2 (diff)
downloadnextpnr-5b2db015a9fb27f9af9a1ce4a2f7b186fb56ea03.tar.gz
nextpnr-5b2db015a9fb27f9af9a1ce4a2f7b186fb56ea03.tar.bz2
nextpnr-5b2db015a9fb27f9af9a1ce4a2f7b186fb56ea03.zip
Merge pull request #752 from YosysHQ/gatecat/du-mem-error
design_utils: Fix memory error
Diffstat (limited to 'common')
-rw-r--r--common/design_utils.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/design_utils.cc b/common/design_utils.cc
index a892feaa..da5decf9 100644
--- a/common/design_utils.cc
+++ b/common/design_utils.cc
@@ -161,7 +161,8 @@ void rename_net(Context *ctx, NetInfo *net, IdString new_name)
if (net == nullptr)
return;
NPNR_ASSERT(!ctx->nets.count(new_name));
- std::swap(ctx->nets[net->name], ctx->nets[new_name]);
+ ctx->nets[new_name];
+ std::swap(ctx->nets.at(net->name), ctx->nets.at(new_name));
ctx->nets.erase(net->name);
net->name = new_name;
}