[Scummvm-git-logs] scummvm master -> 9b3dd840bb5b1b1ebe1035a6900bfb7de050f67d

criezy criezy at scummvm.org
Mon Mar 22 22:25:04 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9b3dd840bb STARK: Fix unknown key error in ShortestPath


Commit: 9b3dd840bb5b1b1ebe1035a6900bfb7de050f67d
    https://github.com/scummvm/scummvm/commit/9b3dd840bb5b1b1ebe1035a6900bfb7de050f67d
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-03-22T22:24:10Z

Commit Message:
STARK: Fix unknown key error in ShortestPath

The error happened when the goal is not reachable.
This fixes bugs #12127 and #12339.

Changed paths:
    engines/stark/movement/shortestpath.cpp


diff --git a/engines/stark/movement/shortestpath.cpp b/engines/stark/movement/shortestpath.cpp
index 412300c857..47ae3fea3c 100644
--- a/engines/stark/movement/shortestpath.cpp
+++ b/engines/stark/movement/shortestpath.cpp
@@ -69,7 +69,7 @@ ShortestPath::NodeList ShortestPath::rebuildPath(const Resources::FloorEdge *sta
 	path.push_front(goal);
 
 	while (current && current != start) {
-		current = cameFrom[current];
+		current = cameFrom.getValOrDefault(current, nullptr);
 		path.push_front(current);
 	}
 




More information about the Scummvm-git-logs mailing list