diff --git a/src/tnode.h b/src/tnode.h index c8544c33f..c3658f606 100644 --- a/src/tnode.h +++ b/src/tnode.h @@ -143,7 +143,7 @@ class tnode_t { static_assert(child_type_possible_at_index(), "Cannot contain a child of this type"); const parse_node_t *child = nullptr; - if (nodeptr) child = &get_child_node(); + if (nodeptr) child = tree->get_child(*nodeptr, Index); if (child && child->type == ChildType::token) return {tree, child}; return {}; }