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
This commit is contained in:
parent
8edca8e903
commit
cbc65befa8
2 changed files with 5 additions and 1 deletions
|
@ -1129,7 +1129,10 @@ static void decodeGeneric(LodePNG_Decoder* decoder, unsigned char* in, size_t si
|
|||
{
|
||||
if (chunkLength != 1) { decoder->error = 43; break; } /*error: this chunk must be 1 byte for indexed color image*/
|
||||
decoder->infoPng.background_defined = 1;
|
||||
decoder->infoPng.background_r = decoder->infoPng.background_g = decoder->infoPng.background_g = data[0];
|
||||
decoder->infoPng.background_r = decoder->infoPng.color.palette[4 * data[0] + 0];
|
||||
decoder->infoPng.background_g = decoder->infoPng.color.palette[4 * data[0] + 1];
|
||||
decoder->infoPng.background_b = decoder->infoPng.color.palette[4 * data[0] + 2];
|
||||
|
||||
}
|
||||
else if (decoder->infoPng.color.colorType == 0 || decoder->infoPng.color.colorType == 4)
|
||||
{
|
||||
|
|
|
@ -537,6 +537,7 @@ Danny Attar
|
|||
Philipp Stephani
|
||||
Tore Johnny Bråtveit
|
||||
Marcin Bukat
|
||||
Andrew Rodland
|
||||
|
||||
The libmad team
|
||||
The wavpack team
|
||||
|
|
Loading…
Reference in a new issue