From bb1ebffbea325eeb10ffbe04ba6406b0e68217a2 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 4 Jun 2015 20:24:43 -0400 Subject: IMAGE: Move a memcpy out of a loop it shouldn't be in --- image/codecs/cinepak.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'image') diff --git a/image/codecs/cinepak.cpp b/image/codecs/cinepak.cpp index 32f6be2cd5..4e858921ee 100644 --- a/image/codecs/cinepak.cpp +++ b/image/codecs/cinepak.cpp @@ -433,9 +433,11 @@ const Graphics::Surface *CinepakDecoder::decodeFrame(Common::SeekableReadStream for (uint16 j = 0; j < 256; j++) { _curFrame.strips[i].v1_codebook[j] = _curFrame.strips[i - 1].v1_codebook[j]; _curFrame.strips[i].v4_codebook[j] = _curFrame.strips[i - 1].v4_codebook[j]; - memcpy(_curFrame.strips[i].v1_dither, _curFrame.strips[i - 1].v1_dither, 256 * 4 * 4 * 4); - memcpy(_curFrame.strips[i].v4_dither, _curFrame.strips[i - 1].v4_dither, 256 * 4 * 4 * 4); } + + // Copy the QuickTime dither tables + memcpy(_curFrame.strips[i].v1_dither, _curFrame.strips[i - 1].v1_dither, 256 * 4 * 4 * 4); + memcpy(_curFrame.strips[i].v4_dither, _curFrame.strips[i - 1].v4_dither, 256 * 4 * 4 * 4); } _curFrame.strips[i].id = stream.readUint16BE(); -- cgit v1.2.3