From 5df88eb73be77446e520d542e062ebcc4728cd78 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Tue, 28 Jul 2020 12:20:23 +0200 Subject: [PATCH] singlyl inked list bugfix --- container/SinglyLinkedList.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/SinglyLinkedList.h b/container/SinglyLinkedList.h index 7d5fc4a9..eb6ae276 100644 --- a/container/SinglyLinkedList.h +++ b/container/SinglyLinkedList.h @@ -100,7 +100,7 @@ public: */ ElementIterator back() const { LinkedElement *element = start; - while (element != nullptr) { + while (element->getNext() != nullptr) { element = element->getNext(); } return ElementIterator::Iterator(element);