diff options
Diffstat (limited to 'engines/kyra/kyra_v1.cpp')
-rw-r--r-- | engines/kyra/kyra_v1.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 71045e116d..d9fc8f9d66 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -470,15 +470,18 @@ void KyraEngine_v1::resetSkipFlag(bool removeEvent) { int KyraEngine_v1::setGameFlag(int flag) { + assert((flag >> 3) >= 0 && (flag >> 3) <= ARRAYSIZE(_flagsTable)); _flagsTable[flag >> 3] |= (1 << (flag & 7)); return 1; } int KyraEngine_v1::queryGameFlag(int flag) const { + assert((flag >> 3) >= 0 && (flag >> 3) <= ARRAYSIZE(_flagsTable)); return ((_flagsTable[flag >> 3] >> (flag & 7)) & 1); } int KyraEngine_v1::resetGameFlag(int flag) { + assert((flag >> 3) >= 0 && (flag >> 3) <= ARRAYSIZE(_flagsTable)); _flagsTable[flag >> 3] &= ~(1 << (flag & 7)); return 0; } |