diff options
author | Strangerke | 2014-09-09 23:54:31 +0200 |
---|---|---|
committer | Strangerke | 2014-09-09 23:54:31 +0200 |
commit | 984858b6382de2e2788fca1469fb380b036989ba (patch) | |
tree | 53d6bc9c7eb9882b19dcc5fcf58c358e2c43fd18 /engines/access | |
parent | e854ec1bc98efcddc006fbf0078d15f51ffcb264 (diff) | |
download | scummvm-rg350-984858b6382de2e2788fca1469fb380b036989ba.tar.gz scummvm-rg350-984858b6382de2e2788fca1469fb380b036989ba.tar.bz2 scummvm-rg350-984858b6382de2e2788fca1469fb380b036989ba.zip |
ACCESS: Fix an issue in checkCode
Diffstat (limited to 'engines/access')
-rw-r--r-- | engines/access/room.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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; |