singlyl inked list bugfix

This commit is contained in:
Robin Müller 2020-07-28 12:20:23 +02:00
parent 538962d0c2
commit 5df88eb73b

View File

@ -100,7 +100,7 @@ public:
*/
ElementIterator back() const {
LinkedElement<T> *element = start;
while (element != nullptr) {
while (element->getNext() != nullptr) {
element = element->getNext();
}
return ElementIterator::Iterator(element);