mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-10-07 10:24:00 +02:00
design_utils: Fix memory error
Signed-off-by: gatecat <[email protected]>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user