mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-15 23:16:00 +08:00
Update tiny_gltf.h
Removed `#undef` and used the @syoyo method: https://github.com/syoyo/tinygltf/pull/467#issuecomment-1838703699
This commit is contained in:
parent
03b3a31e02
commit
8acf861db7
@ -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<uint32_t>::max()) {
|
||||
if (header_and_json_size > (std::numeric_limits<uint32_t>::max)()) {
|
||||
// Do not allow 4GB or more GLB data.
|
||||
if (err) {
|
||||
(*err) = "Invalid glTF binary. GLB data exceeds 4GB.";
|
||||
|
Loading…
x
Reference in New Issue
Block a user