From 07d1f18f5398d08149ded6a89028ce7953749bd3 Mon Sep 17 00:00:00 2001 From: BhaaL Date: Sat, 21 Jan 2017 21:27:25 +0100 Subject: [PATCH] CompressFileToBlob: add an explicit seek to make sure we're at the start --- Source/Core/DiscIO/CompressedBlob.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/DiscIO/CompressedBlob.cpp b/Source/Core/DiscIO/CompressedBlob.cpp index 660bad7224..7c89121278 100644 --- a/Source/Core/DiscIO/CompressedBlob.cpp +++ b/Source/Core/DiscIO/CompressedBlob.cpp @@ -216,6 +216,8 @@ bool CompressFileToBlob(const std::string& infile_path, const std::string& outfi outfile.Seek(sizeof(CompressedBlobHeader), SEEK_CUR); // seek past the offset and hash tables (we will write them at the end) outfile.Seek((sizeof(u64) + sizeof(u32)) * header.num_blocks, SEEK_CUR); + // seek to the start of the input file to make sure we get everything + infile.Seek(0, SEEK_SET); // Now we are ready to write compressed data! u64 position = 0;