aboutsummaryrefslogtreecommitdiffstats
path: root/json/jsonwrite.cc
diff options
context:
space:
mode:
Diffstat (limited to 'json/jsonwrite.cc')
-rw-r--r--json/jsonwrite.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/json/jsonwrite.cc b/json/jsonwrite.cc
index 1229957b..3d3b70e4 100644
--- a/json/jsonwrite.cc
+++ b/json/jsonwrite.cc
@@ -95,7 +95,7 @@ std::vector<PortGroup> group_ports(Context *ctx)
if (int(grp.bits.size()) <= index)
grp.bits.resize(index + 1, -1);
NPNR_ASSERT(grp.bits.at(index) == -1);
- grp.bits.at(index) = pair.first.index;
+ grp.bits.at(index) = pair.second.net ? pair.second.net->name.index : pair.first.index;
}
}
return groups;