From 8acf861db78b72926dc86cb15729a359f785baa3 Mon Sep 17 00:00:00 2001 From: rhiskey <35545041+rhiskey@users.noreply.github.com> Date: Mon, 4 Dec 2023 17:11:59 +0300 Subject: [PATCH] Update tiny_gltf.h Removed `#undef` and used the @syoyo method: https://github.com/syoyo/tinygltf/pull/467#issuecomment-1838703699 --- tiny_gltf.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index cd86ce0..d470bf4 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -6669,8 +6669,7 @@ bool TinyGLTF::LoadBinaryFromMemory(Model *model, std::string *err, // Use 64bit uint to avoid integer overflow. uint64_t header_and_json_size = 20ull + uint64_t(chunk0_length); -#undef max - if (header_and_json_size > std::numeric_limits::max()) { + if (header_and_json_size > (std::numeric_limits::max)()) { // Do not allow 4GB or more GLB data. if (err) { (*err) = "Invalid glTF binary. GLB data exceeds 4GB.";