fix 2 for the linked list

This commit is contained in:
Mylloon 2022-11-16 16:46:17 +01:00
parent 26c9fe99ca
commit 72b597b1fc
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -30,6 +30,7 @@ void ajoute_liste(Liste *liste, Element *nouveau) {
while (ptr) { while (ptr) {
ptr = ptr->suivant; ptr = ptr->suivant;
} }
nouveau->suivant = liste->premier;
liste->premier = nouveau; liste->premier = nouveau;
} }