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?)";