bug fix, last point are was not reachable

This commit is contained in:
2022-12-28 14:59:26 +01:00
parent 290fa03955
commit 4d2ee3caa2
+4 -2
View File
@@ -110,8 +110,10 @@ Point Route::getNextPoint() {
this->it++; this->it++;
this->currentPoint++; this->currentPoint++;
return *this->it; return *this->it;
} } else if (this->it == this->points.end() && this->currentPoint != this->points.size()) {
else this->currentPoint++;
return *this->it;
} else
return Point(0, 0); return Point(0, 0);
} }