diff options
| author | nitsuja- <nitsuja-@hotmail.com> | 2010-12-31 10:40:49 +0000 |
|---|---|---|
| committer | nitsuja- <nitsuja-@hotmail.com> | 2010-12-31 10:40:49 +0000 |
| commit | a55925af794cdcee4cb65301927e7824a223d502 (patch) | |
| tree | 8f49f4b78a043c205c45cac69a12828693a2507d /Source/Core/Common/Src/FileUtil.cpp | |
| parent | 134fca9b82436477cd8f2f7762da0a42f83b1b82 (diff) | |
fixed crash when compressing 4+gb isos on some builds
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6700 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/FileUtil.cpp')
| -rw-r--r-- | Source/Core/Common/Src/FileUtil.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index 90b90a9c35..c8ef55103f 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -362,13 +362,14 @@ u64 GetSize(const int fd) // Overloaded GetSize, accepts FILE* u64 GetSize(FILE *f) { - off_t pos = ftello(f); + // can't use off_t here because it can be 32-bit + u64 pos = ftello(f); if (fseeko(f, 0, SEEK_END) != 0) { ERROR_LOG(COMMON, "GetSize: seek failed %p: %s", f, GetLastErrorMsg()); return 0; } - off_t size = ftello(f); + u64 size = ftello(f); if ((size != pos) && (fseeko(f, pos, SEEK_SET) != 0)) { ERROR_LOG(COMMON, "GetSize: seek failed %p: %s", f, GetLastErrorMsg()); |
