diff options
author | Johannes Schickel | 2010-06-24 22:55:44 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-06-24 22:55:44 +0000 |
commit | 1e29dc3641919ecca4589ba40df7789e6758c037 (patch) | |
tree | bfcd91ce6180bceb56fe3c716305ddee7d632ff3 /engines/cine | |
parent | ff33acb132c3d7f15060e528c7ac4bf34321807e (diff) | |
download | scummvm-rg350-1e29dc3641919ecca4589ba40df7789e6758c037.tar.gz scummvm-rg350-1e29dc3641919ecca4589ba40df7789e6758c037.tar.bz2 scummvm-rg350-1e29dc3641919ecca4589ba40df7789e6758c037.zip |
Fixed use of uninitialized variable.
svn-id: r50250
Diffstat (limited to 'engines/cine')
-rw-r--r-- | engines/cine/gfx.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index aa0330df84..1f747c5a01 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -837,14 +837,11 @@ void OSRenderer::savePalette(Common::OutSaveFile &fHandle) { */ void OSRenderer::restorePalette(Common::SeekableReadStream &fHandle, int version) { byte buf[kHighPalNumBytes]; - uint colorCount; - - if (version > 0) - colorCount = fHandle.readUint16LE(); + uint colorCount = (version > 0) ? fHandle.readUint16LE() : kHighPalNumBytes; fHandle.read(buf, kHighPalNumBytes); - if (colorCount == kHighPalNumBytes || version == 0) { + if (colorCount == kHighPalNumBytes) { // Load the active 256 color palette from file _activePal.load(buf, sizeof(buf), kHighPalFormat, kHighPalNumColors, CINE_LITTLE_ENDIAN); } else { |