aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2008-08-17 18:58:23 +0000
committerEugene Sandulenko2008-08-17 18:58:23 +0000
commit19b6334418e403491796a398b615a512aad04c5a (patch)
tree5eecf3dd4b2bfbff7d2e5b1545a7b341eedf8d26
parenta32cae809b5b12c592510285f09e125f7bc9415c (diff)
downloadscummvm-rg350-19b6334418e403491796a398b615a512aad04c5a.tar.gz
scummvm-rg350-19b6334418e403491796a398b615a512aad04c5a.tar.bz2
scummvm-rg350-19b6334418e403491796a398b615a512aad04c5a.zip
Patch #2045543: Possible fix for Drascula's decodeRLE()
svn-id: r33973
-rw-r--r--engines/drascula/graphics.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp
index 67993bfb6c..e1b390efa1 100644
--- a/engines/drascula/graphics.cpp
+++ b/engines/drascula/graphics.cpp
@@ -621,12 +621,11 @@ void DrasculaEngine::decodeRLE(byte* srcPtr, byte* dstPtr) {
pixel = *srcPtr++;
}
for (uint j = 0; j < repeat; j++) {
- curByte++;
- if (curByte > 64000) {
+ *dstPtr++ = pixel;
+ if (++curByte >= 64000) {
stopProcessing = true;
break;
}
- *dstPtr++ = pixel;
}
}
}