Merge pull request #446 from nyalldawson/fix_error

Fix misleading error message
This commit is contained in:
Syoyo Fujita 2023-08-24 22:11:50 +09:00 committed by GitHub
commit ddc76f7724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6644,8 +6644,8 @@ bool TinyGLTF::LoadBinaryFromMemory(Model *model, std::string *err,
if (err) { if (err) {
(*err) = (*err) =
"Insufficient storage space for Chunk1(BIN data). At least Chunk1 " "Insufficient storage space for Chunk1(BIN data). At least Chunk1 "
"Must have 4 bytes or more bytes, but got " + "Must have 4 or more bytes, but got " +
std::to_string((header_and_json_size + 12ull) - uint64_t(length)) + std::to_string((header_and_json_size + 8ull) - uint64_t(length)) +
".\n"; ".\n";
} }
return false; return false;