diff options
author | uruk | 2014-07-07 23:35:27 +0200 |
---|---|---|
committer | uruk | 2014-07-07 23:35:27 +0200 |
commit | 10a37ea478050c37d368f31815fb189f4c7af7b1 (patch) | |
tree | f5973167124f66bb44951d62c20be3e7f89e54ef | |
parent | 1335247f8235c4abd3062ff0989ea2a3cd5b608b (diff) | |
download | scummvm-rg350-10a37ea478050c37d368f31815fb189f4c7af7b1.tar.gz scummvm-rg350-10a37ea478050c37d368f31815fb189f4c7af7b1.tar.bz2 scummvm-rg350-10a37ea478050c37d368f31815fb189f4c7af7b1.zip |
CGE2: Fix Hero::setCurrent().
This fixes a crash regarding the mechanic on scene 6.
-rw-r--r-- | engines/cge2/hero.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp index 85eb09bede..393aa4b87c 100644 --- a/engines/cge2/hero.cpp +++ b/engines/cge2/hero.cpp @@ -216,7 +216,7 @@ void Hero::setCurrent() { int h = -(tmp.trunc()); int i = 0; - for (; i < kDimMax; i++) { + for (; i < kDimMax - 1; i++) { if (h >= (_hig[i] + _hig[i + 1]) / 2) break; } |