aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2008-03-28 17:38:45 +0000
committerFilippos Karapetis2008-03-28 17:38:45 +0000
commit70e450327455a64cb469f8a1f55e4028ce285de2 (patch)
tree1bbe9c08bdaaa27a138cb44cdf6b2b452114aa13
parent7605a9a5174ac5570cc29f92f4b467ab1b350b44 (diff)
downloadscummvm-rg350-70e450327455a64cb469f8a1f55e4028ce285de2.tar.gz
scummvm-rg350-70e450327455a64cb469f8a1f55e4028ce285de2.tar.bz2
scummvm-rg350-70e450327455a64cb469f8a1f55e4028ce285de2.zip
Fixed 2 off-by-one errors (thanks next_ghost for spotting them)
svn-id: r31296
-rw-r--r--engines/cine/anim.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp
index 2cd3bd056b..ed8af2f5c4 100644
--- a/engines/cine/anim.cpp
+++ b/engines/cine/anim.cpp
@@ -491,10 +491,10 @@ void convert8BBP2(byte * dest, byte * source, int16 width, int16 height) {
for (j = 0; j < (width * height) / 16; j++) {
// m = 0: even bits, m = 1: odd bits
- for (m = 0; m == 1; m++) {
+ for (m = 0; m < 2; m++) {
for (i = 0; i < 8; i++) {
color = 0;
- for (k = 14 + m; k == 0 + m; k = k - 2) {
+ for (k = 14 + m; k > 0 + m; k = k - 2) {
color |= ((*(source + k) & 0x080) >> 7);
*(source + k) <<= 1;
if (k > 0 + m)