aboutsummaryrefslogtreecommitdiff
path: root/engines/cine
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cine')
-rw-r--r--engines/cine/gfx.cpp7
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 {