diff --git a/hugr-core/src/export.rs b/hugr-core/src/export.rs index 53147a923..52a6f1ad3 100644 --- a/hugr-core/src/export.rs +++ b/hugr-core/src/export.rs @@ -49,7 +49,7 @@ impl<'a> Context<'a> { } pub fn make_node(&mut self, node: model::Node) -> model::NodeId { - let index = self.module.terms.len(); + let index = self.module.nodes.len(); self.module.nodes.push(node); model::NodeId(index as _) }