aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2011-03-06 18:36:33 +1100
committerPaul Gilbert2011-03-06 18:36:33 +1100
commit14843c3b87fb891c476540b18709a7c00a86585e (patch)
tree3bc665a650cef99cc5ebf895b3331495332270b8
parent67f0e5530afaf9bb115ffd0f6f836a577f8106fd (diff)
downloadscummvm-rg350-14843c3b87fb891c476540b18709a7c00a86585e.tar.gz
scummvm-rg350-14843c3b87fb891c476540b18709a7c00a86585e.tar.bz2
scummvm-rg350-14843c3b87fb891c476540b18709a7c00a86585e.zip
TSAGE: Fix stack overrun in the pathfinder
-rw-r--r--engines/tsage/core.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index d4c4caacdf..405a5206bc 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -842,7 +842,7 @@ void PlayerMover::checkMovement2(const Common::Point &srcPos, const Common::Poin
}
int PlayerMover::proc1(int *routeList, int srcRegion, int destRegion, int &v) {
- int tempList[REGION_LIST_SIZE];
+ int tempList[REGION_LIST_SIZE + 1];
v = 0;
for (int idx = 0; idx <= *routeList; ++idx)
tempList[idx] = routeList[idx];