Fix PNG tRNS length checks
This commit is contained in:
parent
bc2efc4870
commit
fda03ee4ca
1 changed files with 2 additions and 2 deletions
|
@ -2274,7 +2274,7 @@ void R_LoadPNG(const char *name, byte **pic, int *width, int *height)
|
||||||
{
|
{
|
||||||
case PNG_ColourType_Grey :
|
case PNG_ColourType_Grey :
|
||||||
{
|
{
|
||||||
if(!ChunkHeaderLength == 2)
|
if(ChunkHeaderLength != 2)
|
||||||
{
|
{
|
||||||
CloseBufferedFile(ThePNG);
|
CloseBufferedFile(ThePNG);
|
||||||
|
|
||||||
|
@ -2296,7 +2296,7 @@ void R_LoadPNG(const char *name, byte **pic, int *width, int *height)
|
||||||
|
|
||||||
case PNG_ColourType_True :
|
case PNG_ColourType_True :
|
||||||
{
|
{
|
||||||
if(!ChunkHeaderLength == 6)
|
if(ChunkHeaderLength != 6)
|
||||||
{
|
{
|
||||||
CloseBufferedFile(ThePNG);
|
CloseBufferedFile(ThePNG);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue