From d4a2afe345e40a4af30f8fb903ffff6413680d21 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Tue, 15 Jul 2014 01:38:05 +1200 Subject: [PATCH] Fix another protential issue with casting. Another issue from #334 with the casting moved from the output of min to it's inputs. This is a non-issue on 64 bit machines, but if dolphin is compiled on an OS with size_t == u32 (say ARM) then remainingSize could be truncated. Restored the casting to the original order before #334. --- Source/Core/DiscIO/FileSystemGCWii.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DiscIO/FileSystemGCWii.cpp b/Source/Core/DiscIO/FileSystemGCWii.cpp index ff32a4015f..afc9b12201 100644 --- a/Source/Core/DiscIO/FileSystemGCWii.cpp +++ b/Source/Core/DiscIO/FileSystemGCWii.cpp @@ -104,7 +104,7 @@ bool CFileSystemGCWii::ExportFile(const std::string& _rFullPath, const std::stri while (remainingSize) { // Limit read size to 128 MB - size_t readSize = std::min(remainingSize, (u64)0x08000000); + size_t readSize = (size_t)std::min(remainingSize, (u64)0x08000000); std::vector buffer(readSize);