mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 13:35:58 +08:00
Fix parsing a glTF file with 2GB+ or lareger size.
This commit is contained in:
parent
83bb1a48d7
commit
e886247329
@ -2614,7 +2614,7 @@ bool ReadWholeFile(std::vector<unsigned char> *out, std::string *err,
|
|||||||
size_t sz = static_cast<size_t>(f.tellg());
|
size_t sz = static_cast<size_t>(f.tellg());
|
||||||
f.seekg(0, f.beg);
|
f.seekg(0, f.beg);
|
||||||
|
|
||||||
if (int(sz) < 0) {
|
if (int64_t(sz) < 0) {
|
||||||
if (err) {
|
if (err) {
|
||||||
(*err) += "Invalid file size : " + filepath +
|
(*err) += "Invalid file size : " + filepath +
|
||||||
" (does the path point to a directory?)";
|
" (does the path point to a directory?)";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user