From 5917467c1b3faa97ec5a7b95eeface6d097cda77 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Fri, 18 Mar 2016 09:10:10 -0500 Subject: SCI32: Fix incorrect double-read from CLUT --- engines/sci/graphics/frameout.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 82a33e4bd8..b654cbf2b9 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -1017,7 +1017,10 @@ void GfxFrameout::alterVmap(const Palette &palette1, const Palette &palette2, co int8 styleRangeValue = styleRanges[currentValue]; if (styleRangeValue == -1 && styleRangeValue == style) { currentValue = pixels[pixelIndex] = clut[currentValue]; - styleRangeValue = styleRanges[clut[currentValue]]; + // NOTE: In original engine this assignment happens outside of the + // condition, but if the branch is not followed the value is just + // going to be the same as it was before + styleRangeValue = styleRanges[currentValue]; } if ( -- cgit v1.2.3