Skip to content

Commit 8acf861

Browse files
authored
Update tiny_gltf.h
Removed `#undef` and used the @syoyo method: syoyo#467 (comment)
1 parent 03b3a31 commit 8acf861

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tiny_gltf.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -6669,8 +6669,7 @@ bool TinyGLTF::LoadBinaryFromMemory(Model *model, std::string *err,
66696669
// Use 64bit uint to avoid integer overflow.
66706670
uint64_t header_and_json_size = 20ull + uint64_t(chunk0_length);
66716671

6672-
#undef max
6673-
if (header_and_json_size > std::numeric_limits<uint32_t>::max()) {
6672+
if (header_and_json_size > (std::numeric_limits<uint32_t>::max)()) {
66746673
// Do not allow 4GB or more GLB data.
66756674
if (err) {
66766675
(*err) = "Invalid glTF binary. GLB data exceeds 4GB.";

0 commit comments

Comments
 (0)