diff options
-rw-r--r-- | graphics/png.cpp | 2 | ||||
-rw-r--r-- | graphics/png.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/graphics/png.cpp b/graphics/png.cpp index d0fe64bf25..5292ea0100 100644 --- a/graphics/png.cpp +++ b/graphics/png.cpp @@ -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 diff --git a/graphics/png.h b/graphics/png.h index 6b695b5beb..b2ba7ac0f2 100644 --- a/graphics/png.h +++ b/graphics/png.h @@ -145,7 +145,7 @@ private: PNGHeader _header; byte _palette[256 * 4]; // RGBA - byte _paletteEntries; + uint16 _paletteEntries; uint16 _transparentColor[3]; bool _transparentColorSpecified; |