Closed nithinp7 closed 2 years ago
Thanks for the PR @nithinp7. This is an important fix.
The associated spec for this should be updated too, since it clearly did not do enough to cover all cases: https://github.com/CesiumGS/cdb-to-3dtiles/blob/c7b1c67916db02ce493760664a08b8101611ec17/Tests/GltfTest.cpp#L325
I ran into the same problem. Even though the unit test could be improved I'm going to merge just so we get this fix in.
When adding padding to a glb to align to 8-byte boundaries, I don't think the glb's length and the json chunk's length were being properly updated. The new uint32_t byte lengths after padding were being static_cast to a char and put in the left-most byte of the byte length slots within the glb buffer.