aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/bundle.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scumm/bundle.cpp b/scumm/bundle.cpp
index f35a78485f..52fc3da875 100644
--- a/scumm/bundle.cpp
+++ b/scumm/bundle.cpp
@@ -865,7 +865,10 @@ int32 Bundle::decompressCodec(int32 codec, byte *comp_input, byte *comp_output,
outputWord = 0;
imcTableEntry = 7;
}
- left = (origLeft - 1) / (2 * channels) + 1;
+
+ left = (origLeft - 1) / (2 * (channels - channel)) + 1;
+ origLeft -= 2* left;
+
destPos = startPos + 2 * channel;
while (left--) {
curTableEntry = _destImcTable[curTablePos];