From 7ae068380937c308c9c3f222566cb187316517c3 Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 3 Apr 2026 16:59:10 +0200 Subject: [PATCH] tentative correction double.c insert --- Chains_across_the_Island/Fundamentals/double/double.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Chains_across_the_Island/Fundamentals/double/double.c b/Chains_across_the_Island/Fundamentals/double/double.c index fc2b016..263027c 100644 --- a/Chains_across_the_Island/Fundamentals/double/double.c +++ b/Chains_across_the_Island/Fundamentals/double/double.c @@ -28,7 +28,12 @@ int dlist_insert(struct dlist **l, size_t index, int e) //struct dlist *tmp = *l; if(index == 0){ - dlist_append(*l, e); + + new_node->prev = NULL; + new_node->next = *l; + new_node->data = e; + + //dlist_append(*l, e); return 0; }