Fix gltf json parsing error due to insufficient buffer padding.
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled

This commit is contained in:
2026-10-07 22:28:47 -07:00
parent 7866268dff
commit ad75b6af44

View File

@@ -450,7 +450,7 @@ KRBundle* KRResource::LoadGltf(KRContext& context, const std::string& path)
jsonData.expand(SIMDJSON_PADDING);
jsonData.lock();
auto error = parser.iterate((const char*)jsonData.getStart(), jsonData.getSize()).get(doc);
auto error = parser.iterate((uint8_t*)jsonData.getStart(), jsonData.getSize() - SIMDJSON_PADDING, jsonData.getSize()).get(doc);
jsonData.unlock();
if (error) {