[Scummvm-cvs-logs] SF.net SVN: scummvm:[50250] scummvm/trunk/engines/cine/gfx.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Fri Jun 25 00:55:44 CEST 2010
Revision: 50250
http://scummvm.svn.sourceforge.net/scummvm/?rev=50250&view=rev
Author: lordhoto
Date: 2010-06-24 22:55:44 +0000 (Thu, 24 Jun 2010)
Log Message:
-----------
Fixed use of uninitialized variable.
Modified Paths:
--------------
scummvm/trunk/engines/cine/gfx.cpp
Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp 2010-06-24 22:55:24 UTC (rev 50249)
+++ scummvm/trunk/engines/cine/gfx.cpp 2010-06-24 22:55:44 UTC (rev 50250)
@@ -837,14 +837,11 @@
*/
void OSRenderer::restorePalette(Common::SeekableReadStream &fHandle, int version) {
byte buf[kHighPalNumBytes];
- uint colorCount;
+ uint colorCount = (version > 0) ? fHandle.readUint16LE() : kHighPalNumBytes;
- if (version > 0)
- colorCount = fHandle.readUint16LE();
-
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 {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list