diff options
author | Colin Snover | 2016-05-28 11:02:40 -0500 |
---|---|---|
committer | Colin Snover | 2016-05-28 11:02:40 -0500 |
commit | 694d4edd1595dead62cea18d30da2c52e42be424 (patch) | |
tree | bcd6949dffaf8aff6b6c7bc091f5ccf546c941c9 /engines/sci | |
parent | 0c708ddcf7087967bcf7bc791c55c473b7278e6e (diff) | |
download | scummvm-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.
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 4 |
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; |