Support files larger than 2GB in Win64

This commit is contained in:
Hugh 2021-03-12 17:50:46 +09:00 committed by Tom Finegan
parent cdf1fd20a9
commit 4469f97beb

View File

@ -87,7 +87,13 @@ size_t StdioFileReader::GetFileSize() {
return false;
}
#if defined(_WIN64)
const size_t file_size = static_cast<size_t>(_ftelli64(file_));
#else
const size_t file_size = static_cast<size_t>(ftell(file_));
#endif
rewind(file_);
return file_size;