[Scummvm-cvs-logs] SF.net SVN: scummvm:[55742] scummvm/trunk/graphics
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Feb 2 22:18:11 CET 2011
Revision: 55742
http://scummvm.svn.sourceforge.net/scummvm/?rev=55742&view=rev
Author: thebluegr
Date: 2011-02-02 21:18:10 +0000 (Wed, 02 Feb 2011)
Log Message:
-----------
GRAPHICS: Fixed a bug with indexed PNGs in the PNG decoder (a byte can't hold 256 entries)
Modified Paths:
--------------
scummvm/trunk/graphics/png.cpp
scummvm/trunk/graphics/png.h
Modified: scummvm/trunk/graphics/png.cpp
===================================================================
--- scummvm/trunk/graphics/png.cpp 2011-02-02 21:12:51 UTC (rev 55741)
+++ scummvm/trunk/graphics/png.cpp 2011-02-02 21:18:10 UTC (rev 55742)
@@ -441,7 +441,7 @@
}
void PNG::readPaletteChunk() {
- for (byte i = 0; i < _paletteEntries; i++) {
+ for (uint16 i = 0; i < _paletteEntries; i++) {
_palette[i * 4 + 0] = _stream->readByte(); // R
_palette[i * 4 + 1] = _stream->readByte(); // G
_palette[i * 4 + 2] = _stream->readByte(); // B
Modified: scummvm/trunk/graphics/png.h
===================================================================
--- scummvm/trunk/graphics/png.h 2011-02-02 21:12:51 UTC (rev 55741)
+++ scummvm/trunk/graphics/png.h 2011-02-02 21:18:10 UTC (rev 55742)
@@ -145,7 +145,7 @@
PNGHeader _header;
byte _palette[256 * 4]; // RGBA
- byte _paletteEntries;
+ uint16 _paletteEntries;
uint16 _transparentColor[3];
bool _transparentColorSpecified;
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