瀏覽代碼

Fixed incorrect file size returned

According to
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365740%28v=vs.85%29.aspx
to return the actual file size you need to use the high and low file
size.
Nathan Bowhay 10 年之前
父節點
當前提交
32e3678000
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Engine/source/platformWin32/winFileio.cpp

+ 1 - 1
Engine/source/platformWin32/winFileio.cpp

@@ -998,7 +998,7 @@ S32 Platform::getFileSize(const char *pFilePath)
       return -1;
 
    // must be a real file then
-   return findData.nFileSizeLow;
+   return ((findData.nFileSizeHigh * (MAXDWORD+1)) + findData.nFileSizeLow);
 }