diff options
author | Filippos Karapetis | 2010-10-15 15:40:36 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-10-15 15:40:36 +0000 |
commit | 7f43ed3f9dd3a899a5891e17c3eaa58dc3fd29ad (patch) | |
tree | 8a593bd5efb44ceeb78989dd863bc5148549f411 /engines | |
parent | db369838e20dc29a6bb1ebc2455ca17f0add069b (diff) | |
download | scummvm-rg350-7f43ed3f9dd3a899a5891e17c3eaa58dc3fd29ad.tar.gz scummvm-rg350-7f43ed3f9dd3a899a5891e17c3eaa58dc3fd29ad.tar.bz2 scummvm-rg350-7f43ed3f9dd3a899a5891e17c3eaa58dc3fd29ad.zip |
SCI: Changed the check for vertex_min into an assert (thanks wjp)
svn-id: r53504
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 4ea28ed903..cfd455e7b6 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -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 - if (vertex_min == s->vertex_end || !vertex_min) + if (vertex_min == s->vertex_end) break; // Move vertex from set open to set closed |