diff --git a/Assignment_2/lib/OptimisticList.cpp b/Assignment_2/lib/OptimisticList.cpp index 52f070f..301b6a0 100644 --- a/Assignment_2/lib/OptimisticList.cpp +++ b/Assignment_2/lib/OptimisticList.cpp @@ -114,7 +114,7 @@ bool OptimisticSet::ctn(int element) { bool OptimisticSet::validate(Node* p, Node* c) { Node* n = this->first; - while (n->is_smaller_than(p)) { + while(n->next != c && n->next != 0) { n = n->next; } if ((n == p) && (p->next == c)) {