SCI: Changed the check for vertex_min into an assert (thanks wjp)

svn-id: r53504
This commit is contained in:
Filippos Karapetis 2010-10-15 15:40:36 +00:00
parent db369838e2
commit 7f43ed3f9d

View File

@ -1311,8 +1311,10 @@ static void AStar(PathfindingState *s) {
} }
} }
assert(vertex_min != 0); // the vertex cost should never be bigger than HUGE_DISTANCE
// Check if we are done // Check if we are done
if (vertex_min == s->vertex_end || !vertex_min) if (vertex_min == s->vertex_end)
break; break;
// Move vertex from set open to set closed // Move vertex from set open to set closed