aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-02-24 08:26:58 +0000
committerTravis Howell2005-02-24 08:26:58 +0000
commit40771358a63e9350551f4a7fc46fd6853bae73d0 (patch)
tree82298cd9b01bcbbaaaaa9209f582c1665ae4c258
parent4f01f5e6e9c1b0891b5206cb1c39d98638139344 (diff)
downloadscummvm-rg350-40771358a63e9350551f4a7fc46fd6853bae73d0.tar.gz
scummvm-rg350-40771358a63e9350551f4a7fc46fd6853bae73d0.tar.bz2
scummvm-rg350-40771358a63e9350551f4a7fc46fd6853bae73d0.zip
Correct classId.
svn-id: r16896
-rw-r--r--scumm/sprite_he.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index 19f3b5aa54..782609d003 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -55,14 +55,17 @@ int ScummEngine_v90he::spriteInfoGet_classFlags(int spriteId, int classId) {
}
int ScummEngine_v90he::spriteInfoGet_classFlagsAnd(int spriteId, int num, int *args) {
+ int classId;
+
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
if (!num)
return 1;
for (int i = 0; i < num; i++) {
- checkRange(32, 1, args[i], "class %d out of range in statement");
- if (!(_spriteTable[spriteId].class_flags & (1 << args[i])))
+ classId = args[i] & 0x7F;
+ checkRange(32, 1, classId, "class %d out of range in statement");
+ if (!(_spriteTable[spriteId].class_flags & (1 << classId)))
return 0;
}