mirror of
https://github.com/Lurkki14/tuxclocker.git
synced 2025-02-16 14:34:46 -06:00
assignable: fix index on child append
This commit is contained in:
parent
39b5f30c73
commit
8ada6cd9cd
@ -43,7 +43,7 @@ int8_t tc_assignable_node_add_child(tc_assignable_node_t *parent, tc_assignable_
|
||||
if ((parent->children_nodes = realloc(parent->children_nodes, parent->children_count)) == NULL) {
|
||||
return TC_ENOMEM;
|
||||
}
|
||||
parent->children_nodes[parent->children_count] = child;
|
||||
parent->children_nodes[parent->children_count - 1] = child;
|
||||
child->parent = parent;
|
||||
return TC_SUCCESS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user