aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2016-05-28 11:02:40 -0500
committerColin Snover2016-05-28 11:02:40 -0500
commit694d4edd1595dead62cea18d30da2c52e42be424 (patch)
treebcd6949dffaf8aff6b6c7bc091f5ccf546c941c9
parent0c708ddcf7087967bcf7bc791c55c473b7278e6e (diff)
downloadscummvm-rg350-694d4edd1595dead62cea18d30da2c52e42be424.tar.gz
scummvm-rg350-694d4edd1595dead62cea18d30da2c52e42be424.tar.bz2
scummvm-rg350-694d4edd1595dead62cea18d30da2c52e42be424.zip
SCI32: Provide default value for vmap minDiffIndex
SSCI did not initialise minDiffIndex and would always flow into the condition that sets it, but some compilers complain that the value may be used uninitialised, so we will just set it to map back to its original palette index by default.
-rw-r--r--engines/sci/graphics/frameout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 3903e7b698..64ae828a50 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -987,7 +987,7 @@ void GfxFrameout::alterVmap(const Palette &palette1, const Palette &palette2, co
if (styleRanges[paletteIndex] == style) {
int minDiff = 262140;
- int minDiffIndex;
+ int minDiffIndex = paletteIndex;
for (int i = 0; i < 236; ++i) {
if (styleRanges[i] != style) {
@@ -1007,7 +1007,7 @@ void GfxFrameout::alterVmap(const Palette &palette1, const Palette &palette2, co
if (style == 1 && styleRanges[paletteIndex] == 0) {
int minDiff = 262140;
- int minDiffIndex;
+ int minDiffIndex = paletteIndex;
for (int i = 0; i < 236; ++i) {
int r = palette2.colors[i].r;