diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2010-02-08 22:22:20 +0000 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2010-02-08 22:22:20 +0000 |
| commit | 98ddeadbbf31247d0d88439f42df975da3f57c58 (patch) | |
| tree | fdcf634b1f725da8af5fae035d3da9b9322e6836 /Source/Core/DiscIO/Src/CompressedBlob.cpp | |
| parent | 3f90bb215ce88634cb8772d93dd03c6129fdef3b (diff) | |
Use standard C file i/o in PlainFileReader instead of Windows' functions. Fix a memleak in CompressedBlob and VolumeDirectory. Thanks to baby.lueshi for finding the File i/o issue :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5031 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DiscIO/Src/CompressedBlob.cpp')
| -rw-r--r-- | Source/Core/DiscIO/Src/CompressedBlob.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/DiscIO/Src/CompressedBlob.cpp b/Source/Core/DiscIO/Src/CompressedBlob.cpp index dcaa9da2b6..283633ae85 100644 --- a/Source/Core/DiscIO/Src/CompressedBlob.cpp +++ b/Source/Core/DiscIO/Src/CompressedBlob.cpp @@ -179,7 +179,10 @@ bool CompressFileToBlob(const char* infile, const char* outfile, u32 sub_type, FILE* f = fopen(outfile, "wb"); if (!f) + { + fclose(inf); return false; + } callback("Files opened, ready to compress.", 0, arg); @@ -209,6 +212,7 @@ bool CompressFileToBlob(const char* infile, const char* outfile, u32 sub_type, u64 position = 0; int num_compressed = 0; int num_stored = 0; + for (u32 i = 0; i < header.num_blocks; i++) { if (i % (header.num_blocks / 1000) == 0) |
