Utils: Make sure to seek to start of file when doing PNG check
Vicki Pfau vi@endrift.com
Mon, 01 Feb 2021 01:54:19 -0800
1 files changed,
1 insertions(+),
0 deletions(-)
jump to
M
src/util/png-io.c
→
src/util/png-io.c
@@ -210,6 +210,7 @@ }
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; }