Fix parsing a glTF file with 2GB+ or lareger size.

This commit is contained in:
Syoyo Fujita 2019-10-20 17:47:50 +09:00
parent 83bb1a48d7
commit e886247329

View File

@ -2614,7 +2614,7 @@ bool ReadWholeFile(std::vector<unsigned char> *out, std::string *err,
size_t sz = static_cast<size_t>(f.tellg());
f.seekg(0, f.beg);
if (int(sz) < 0) {
if (int64_t(sz) < 0) {
if (err) {
(*err) += "Invalid file size : " + filepath +
" (does the path point to a directory?)";