mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-18 01:15:53 +08:00
Serialize byteOffset as size_t, avoiding cast
Fixes silently writing an overflowed int in the output file.
This commit is contained in:
parent
acf1e8a2b1
commit
bf7120f8a0
@ -7124,7 +7124,7 @@ static void SerializeGltfAccessor(const Accessor &accessor, detail::json &o) {
|
||||
SerializeNumberProperty<int>("bufferView", accessor.bufferView, o);
|
||||
|
||||
if (accessor.byteOffset != 0)
|
||||
SerializeNumberProperty<int>("byteOffset", int(accessor.byteOffset), o);
|
||||
SerializeNumberProperty<size_t>("byteOffset", accessor.byteOffset, o);
|
||||
|
||||
SerializeNumberProperty<int>("componentType", accessor.componentType, o);
|
||||
SerializeNumberProperty<size_t>("count", accessor.count, o);
|
||||
|
Loading…
x
Reference in New Issue
Block a user