diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tab.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -74,11 +74,12 @@ append_child(MqTab *new_node, MqTab *parent) new_node->next = NULL; new_node->prev = parent->last_child; /* May be NULL */ new_node->first_child = new_node->last_child = NULL; - new_node->position = parent->position; /* Will be updated */ new_node->tree_size = 0; /* Will be updated */ if (parent->last_child) { + new_node->position = parent->last_child->position; parent->last_child->next = new_node; } else { + new_node->position = parent->position; parent->first_child = new_node; } parent->last_child = new_node; |