From 984858b6382de2e2788fca1469fb380b036989ba Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 9 Sep 2014 23:54:31 +0200 Subject: ACCESS: Fix an issue in checkCode --- engines/access/room.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/access') diff --git a/engines/access/room.cpp b/engines/access/room.cpp index 3696a4cadf..2c597609e1 100644 --- a/engines/access/room.cpp +++ b/engines/access/room.cpp @@ -705,9 +705,10 @@ bool Room::codeWalls() { bool Room::checkCode(int v1, int v2) { Player &p = *_vm->_player; - if (!v1) { - } if (!v2 || (v1 == v2)) { - } else if (v1 & 1) { + if (!v1 || !v2 || (v1 == v2)) + return false; + + if (v1 & 1) { if (v2 & 2) { p._collideFlag = true; return true; -- cgit v1.2.3