From 299a96c049c6e92d949a6213f4444c2892df539f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 11 Jan 2016 14:10:53 +0100 Subject: AVALANCE: Fix out of bounds array access. Thanks to uruk for checking on this. --- engines/avalanche/nim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]]) { -- cgit v1.2.3