Skip to content

Commit 9cc8445

Browse files
fix(node): use full count in field_name_for_child
1 parent 839d783 commit 9cc8445

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tree_sitter/binding/node.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ PyObject *node_field_name_for_child(Node *self, PyObject *args) {
218218
PyErr_SetString(PyExc_ValueError, "child index must be positive");
219219
return NULL;
220220
}
221-
if ((uint32_t)index >= ts_node_named_child_count(self->node)) {
221+
if ((uint32_t)index >= ts_node_child_count(self->node)) {
222222
PyErr_SetString(PyExc_IndexError, "child index out of range");
223223
return NULL;
224224
}

0 commit comments

Comments
 (0)