diff --git a/src/common/textures/formats/qoitexture.cpp b/src/common/textures/formats/qoitexture.cpp index 0bdba52c57..d0aa2fd810 100644 --- a/src/common/textures/formats/qoitexture.cpp +++ b/src/common/textures/formats/qoitexture.cpp @@ -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; -} \ No newline at end of file +}