aboutsummaryrefslogtreecommitdiff
path: root/src/linked_list.inc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/linked_list.inc.h')
-rw-r--r--src/linked_list.inc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/linked_list.inc.h b/src/linked_list.inc.h
index 81974a9c..3984e485 100644
--- a/src/linked_list.inc.h
+++ b/src/linked_list.inc.h
@@ -11,6 +11,7 @@ INIT_F ( LLIST(TYPE) ) {
head->after = tail;
tail->before = head;
self->cur = head;
+ self->cval = head->value;
return 0;
}
@@ -69,6 +70,7 @@ int PUSH(LLIST(TYPE)) ( LLIST(TYPE)* lst, TYPE* val) {
// TODO do I want to change that?
lst->cur = link;
+ lst->cval = link->value;
return 0;
}
@@ -157,6 +159,7 @@ int RESET(LLIST(TYPE)) ( LLIST(TYPE)* llist ) {
}
llist->cur = llist->head;
+ llist->cval = llist->head->value;
return 0;
}