Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix assert on meshes on byte_stride = 0 #205

Merged
merged 2 commits into from
Feb 28, 2019

Conversation

repi
Copy link
Contributor

@repi repi commented Feb 24, 2019

Have found glTF meshes (on Google Poly) that specify 0 byte stride for index buffers which caused debug_assert to be triggered on 0 byte stride when calling read_indices.

This should already fail validation, but only the case of validation_completely which is typically not run.

With this change we specifically handle the case of byte stride 0 and treat it as if no byte stride was specified to avoid the debug assert and panicking.

Have found glTF meshes (on Google Poly) that specify 0 byte stride for index buffers causing debug_assert to be triggered on 0 byte stride.

This should already fail validation, but only the case of validation_completely which is typically not run.

With this change we specifically handle the case of byte stride 0 and treat it as if no byte stride was specified to avoid the debug assert and panicking.
@alteous alteous merged commit 4e68a75 into gltf-rs:master Feb 28, 2019
@alteous
Copy link
Member

alteous commented Feb 28, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants