From e886247329067b1b66baeb0b80c76dff5210de80 Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Sun, 20 Oct 2019 17:47:50 +0900 Subject: [PATCH] Fix parsing a glTF file with 2GB+ or lareger size. --- tiny_gltf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index f80ee84..a6c6592 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -2614,7 +2614,7 @@ bool ReadWholeFile(std::vector *out, std::string *err, size_t sz = static_cast(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?)";