Utils: Make sure to seek to start of file when doing PNG check

This commit is contained in:
Vicki Pfau 2021-02-01 01:54:19 -08:00
parent 28504b308e
commit df082b46d9
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}