Skip to content

Commit 84dca14

Browse files
committed
Fix: size_t is not the same everywhere
1 parent 32ed38c commit 84dca14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/fastgltf.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2336,9 +2336,11 @@ void fg::glTF::parseSkins(simdjson::ondemand::array skins) {
23362336
}
23372337
// skin.joints.reserve(array.count_elements());
23382338
for (auto jointValue : array) {
2339-
if (jointValue.get_uint64().get(skin.joints.emplace_back()) != SUCCESS) {
2339+
uint64_t jointIndex;
2340+
if (jointValue.get_uint64().get(jointIndex) != SUCCESS) {
23402341
SET_ERROR_RETURN(Error::InvalidGltf)
23412342
}
2343+
skin.joints.emplace_back(static_cast<size_t>(jointIndex));
23422344
}
23432345
break;
23442346
}

0 commit comments

Comments
 (0)