diff options
-rw-r--r-- | engines/xeen/scripts.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp index b40ba3059f..3422756a67 100644 --- a/engines/xeen/scripts.cpp +++ b/engines/xeen/scripts.cpp @@ -1571,9 +1571,8 @@ bool Scripts::ifProc(int action, uint32 val, int mode, int charIndex) { break; case 18: // Condition - assert(val < 16); - if (!ps->_conditions[val] && !(val & 0x10)) - v = val; + assert(val <= NO_CONDITION); + v = (ps->_conditions[val] || val == NO_CONDITION) ? val : 0xffffffff; break; case 19: { // Can player cast a given spell |