mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
Fix QOI image loading
This commit is contained in:
parent
2261dde791
commit
a4573b4ad1
1 changed files with 2 additions and 1 deletions
|
@ -64,6 +64,7 @@ FImageSource *QOIImage_TryCreate(FileReader &file, int lumpnum)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
file.Seek(0, FileReader::SeekSet);
|
||||
file.Read((void *)&header, sizeof(header));
|
||||
|
||||
if (header.magic[0] != 'q' || header.magic[1] != 'o' || header.magic[2] != 'i' || header.magic[3] != 'f')
|
||||
|
@ -209,4 +210,4 @@ int FQOITexture::CopyPixels(FBitmap *bmp, int conversion)
|
|||
pixels += 4;
|
||||
}
|
||||
return bMasked? -1 : 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue