summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2010-04-25 08:35:30 +0000
committerNils Wallménius <nils@rockbox.org>2010-04-25 08:35:30 +0000
commitcbc65befa8b3fbb53e7e2603f838a79b5fa5fcbc (patch)
treeb312b498e2c94c0b4121b03e49cc93b4732fc11a
parent8edca8e9039e9c128912ee56802cbd505bf3cb23 (diff)
downloadrockbox-cbc65befa8b3fbb53e7e2603f838a79b5fa5fcbc.tar.gz
rockbox-cbc65befa8b3fbb53e7e2603f838a79b5fa5fcbc.zip
Fix for some bogus code in png by Andrew Rodland, fixing a warning when compiling with gcc 4.5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25709 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/imageviewer/png/png.c5
-rw-r--r--docs/CREDITS1
2 files changed, 5 insertions, 1 deletions
diff --git a/apps/plugins/imageviewer/png/png.c b/apps/plugins/imageviewer/png/png.c
index 4a7e0963d9..310b08d990 100644
--- a/apps/plugins/imageviewer/png/png.c
+++ b/apps/plugins/imageviewer/png/png.c
@@ -1129,7 +1129,10 @@ static void decodeGeneric(LodePNG_Decoder* decoder, unsigned char* in, size_t si
1129 { 1129 {
1130 if (chunkLength != 1) { decoder->error = 43; break; } /*error: this chunk must be 1 byte for indexed color image*/ 1130 if (chunkLength != 1) { decoder->error = 43; break; } /*error: this chunk must be 1 byte for indexed color image*/
1131 decoder->infoPng.background_defined = 1; 1131 decoder->infoPng.background_defined = 1;
1132 decoder->infoPng.background_r = decoder->infoPng.background_g = decoder->infoPng.background_g = data[0]; 1132 decoder->infoPng.background_r = decoder->infoPng.color.palette[4 * data[0] + 0];
1133 decoder->infoPng.background_g = decoder->infoPng.color.palette[4 * data[0] + 1];
1134 decoder->infoPng.background_b = decoder->infoPng.color.palette[4 * data[0] + 2];
1135
1133 } 1136 }
1134 else if (decoder->infoPng.color.colorType == 0 || decoder->infoPng.color.colorType == 4) 1137 else if (decoder->infoPng.color.colorType == 0 || decoder->infoPng.color.colorType == 4)
1135 { 1138 {
diff --git a/docs/CREDITS b/docs/CREDITS
index 63563a45fc..9e4d86af78 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -537,6 +537,7 @@ Danny Attar
537Philipp Stephani 537Philipp Stephani
538Tore Johnny Bråtveit 538Tore Johnny Bråtveit
539Marcin Bukat 539Marcin Bukat
540Andrew Rodland
540 541
541The libmad team 542The libmad team
542The wavpack team 543The wavpack team