mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-png-get-trns' into 'master'
Fix potential crash in PNG_Read See merge request KartKrew/Kart!917
This commit is contained in:
commit
437944927e
1 changed files with 1 additions and 3 deletions
|
|
@ -999,9 +999,7 @@ static png_bytep *PNG_Read(
|
||||||
// color is present on the image, the palette flag is disabled.
|
// color is present on the image, the palette flag is disabled.
|
||||||
if (usepal)
|
if (usepal)
|
||||||
{
|
{
|
||||||
png_get_tRNS(png_ptr, png_info_ptr, &trans, &trans_num, &trans_values);
|
if (png_get_tRNS(png_ptr, png_info_ptr, &trans, &trans_num, &trans_values) == PNG_INFO_tRNS)
|
||||||
|
|
||||||
if (trans && trans_num > 0)
|
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
for (i = 0; i < trans_num; i++)
|
for (i = 0; i < trans_num; i++)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue