aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
authorStrangerke2014-09-09 23:54:31 +0200
committerStrangerke2014-09-09 23:54:31 +0200
commit984858b6382de2e2788fca1469fb380b036989ba (patch)
tree53d6bc9c7eb9882b19dcc5fcf58c358e2c43fd18 /engines/access
parente854ec1bc98efcddc006fbf0078d15f51ffcb264 (diff)
downloadscummvm-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.cpp7
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;