From f7b00eb5dcc5c6b460786c7b710dd53db32790e8 Mon Sep 17 00:00:00 2001 From: Nick Chambers Date: Thu, 17 Nov 2022 11:15:02 -0600 Subject: [PATCH] Finish resetting the list on delete --- src/ordinary.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ordinary.c b/src/ordinary.c index 1bb15c7..d2fa5b7 100644 --- a/src/ordinary.c +++ b/src/ordinary.c @@ -16,6 +16,11 @@ void ordinary_list_delete(struct ordinary_list *list) { free(node); // R.I.P. node = next; } + + list->head = NULL; + list->tail = NULL; + list->count = 0; + list->limit = 0; } uint8_t ordinary_list_empty(struct ordinary_list *list) {