summaryrefslogtreecommitdiff
path: root/common/collection
diff options
context:
space:
mode:
Diffstat (limited to 'common/collection')
-rw-r--r--common/collection/collection.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/collection/collection.c b/common/collection/collection.c
index 1e3fe5c3..69475b04 100644
--- a/common/collection/collection.c
+++ b/common/collection/collection.c
@@ -384,6 +384,7 @@ int col_insert_item_into_current(struct collection_item *collection,
current = parent->next;
item->next = current->next;
parent->next = item;
+ if (header->last == current) header->last = item;
col_delete_item(current);
header->count--;
TRACE_FLOW_STRING("col_insert_item_into_current", "Dup overwrite exit");
@@ -397,6 +398,7 @@ int col_insert_item_into_current(struct collection_item *collection,
current = parent->next;
item->next = current->next;
parent->next = item;
+ if (header->last == current) header->last = item;
col_delete_item(current);
header->count--;
TRACE_FLOW_STRING("col_insert_item_into_current", "Dup overwrite exit");