mirror of https://github.com/mgba-emu/mgba.git
Utils: Make sure to seek to start of file when doing PNG check
This commit is contained in:
parent
28504b308e
commit
df082b46d9
|
@ -210,6 +210,7 @@ void PNGWriteClose(png_structp png, png_infop info) {
|
|||
|
||||
bool isPNG(struct VFile* source) {
|
||||
png_byte header[PNG_HEADER_BYTES];
|
||||
source->seek(source, 0, SEEK_SET);
|
||||
if (source->read(source, header, PNG_HEADER_BYTES) < PNG_HEADER_BYTES) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue