mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-27 19:30:41 +00:00
GRAPHICS: Fixed a bug with indexed PNGs in the PNG decoder (a byte can't hold 256 entries)
svn-id: r55742
This commit is contained in:
parent
4263549536
commit
2f08dcb667
@ -441,7 +441,7 @@ byte PNG::getNumColorChannels() {
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -145,7 +145,7 @@ private:
|
||||
PNGHeader _header;
|
||||
|
||||
byte _palette[256 * 4]; // RGBA
|
||||
byte _paletteEntries;
|
||||
uint16 _paletteEntries;
|
||||
uint16 _transparentColor[3];
|
||||
bool _transparentColorSpecified;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user