aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2016-01-11 14:10:53 +0100
committerJohannes Schickel2016-01-11 14:10:53 +0100
commit299a96c049c6e92d949a6213f4444c2892df539f (patch)
treea2be683baac0f316762ce66b2f94a4b11e06b3a9 /engines
parent34e8e9a876739436e84cec7f5e0013bde0fb46de (diff)
downloadscummvm-rg350-299a96c049c6e92d949a6213f4444c2892df539f.tar.gz
scummvm-rg350-299a96c049c6e92d949a6213f4444c2892df539f.tar.bz2
scummvm-rg350-299a96c049c6e92d949a6213f4444c2892df539f.zip
AVALANCE: Fix out of bounds array access.
Thanks to uruk for checking on this.
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/nim.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp
index 79be16d3c3..b17af8767a 100644
--- a/engines/avalanche/nim.cpp
+++ b/engines/avalanche/nim.cpp
@@ -524,7 +524,7 @@ void Nim::dogFood() {
// 1) Look for 2 equal lines, then take the odd one out.
// 2) Look for A.P.s, and capitalise on them.
// 3) Go any old where.
- const byte other[3][2] = { { 2, 3 }, { 1, 3 }, { 1, 2 } };
+ const byte other[3][2] = { { 1, 2 }, { 0, 2 }, { 0, 1 } };
for (int i = 0; i < 3; i++) { // Look for 2 equal lines.
if (_stones[other[i][0]] == _stones[other[i][1]]) {