Skip to content

Commit

Permalink
Fix: size_t is not the same everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
spnda committed Mar 21, 2023
1 parent 32ed38c commit 84dca14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/fastgltf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2336,9 +2336,11 @@ void fg::glTF::parseSkins(simdjson::ondemand::array skins) {
}
// skin.joints.reserve(array.count_elements());
for (auto jointValue : array) {
if (jointValue.get_uint64().get(skin.joints.emplace_back()) != SUCCESS) {
uint64_t jointIndex;
if (jointValue.get_uint64().get(jointIndex) != SUCCESS) {
SET_ERROR_RETURN(Error::InvalidGltf)
}
skin.joints.emplace_back(static_cast<size_t>(jointIndex));
}
break;
}
Expand Down

0 comments on commit 84dca14

Please sign in to comment.