aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'scumm')
-rw-r--r--scumm/sprite_he.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index 0f5bf08abe..d6c7b6ff62 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -426,8 +426,10 @@ int ScummEngine_v90he::spriteGroupGet_allocateGroupSpritesList(int spriteGroupId
numSprites = 1;
for (i = (_varNumSprites - 1); i > 0; i--) {
- if (_spriteTable[i].groupNum == spriteGroupId)
+ if (_spriteTable[i].groupNum == spriteGroupId) {
writeArray(0, 0, numSprites, i);
+ numSprites++;
+ }
}
return readVar(0);