aboutsummaryrefslogtreecommitdiff
path: root/graphics/png.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2011-02-02 21:18:10 +0000
committerFilippos Karapetis2011-02-02 21:18:10 +0000
commit2f08dcb667a0c577d6c18552e0aa896b2ce4e89b (patch)
treee09b68b0f29f94329bb43120b5cf3006fda4d740 /graphics/png.cpp
parent426354953618135c0cffd6e9f34caf606066e363 (diff)
downloadscummvm-rg350-2f08dcb667a0c577d6c18552e0aa896b2ce4e89b.tar.gz
scummvm-rg350-2f08dcb667a0c577d6c18552e0aa896b2ce4e89b.tar.bz2
scummvm-rg350-2f08dcb667a0c577d6c18552e0aa896b2ce4e89b.zip
GRAPHICS: Fixed a bug with indexed PNGs in the PNG decoder (a byte can't hold 256 entries)
svn-id: r55742
Diffstat (limited to 'graphics/png.cpp')
-rw-r--r--graphics/png.cpp2
1 files changed, 1 insertions, 1 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