aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/videoplayer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 0d72751c87..9e49bfc092 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -749,8 +749,11 @@ void VideoPlayer::copyPalette(const Video &video, int16 palStart, int16 palEnd)
if (palEnd < 0)
palEnd = 255;
- memcpy(((char *)(_vm->_global->_pPaletteDesc->vgaPal)) + palStart * 3,
- video.decoder->getPalette() + palStart * 3, (palEnd - palStart + 1) * 3);
+ palStart = palStart * 3;
+ palEnd = (palEnd + 1) * 3;
+
+ for (int i = palStart; i <= palEnd; i++)
+ ((char *)(_vm->_global->_pPaletteDesc->vgaPal))[i] = video.decoder->getPalette()[i] >> 2;
}
} // End of namespace Gob