Skip to content

Commit

Permalink
Merge pull request #236 from zeux/negindex
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuhlmann authored Nov 27, 2023
2 parents 64d6781 + f583f40 commit b164248
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cgltf.h
Original file line number Diff line number Diff line change
Expand Up @@ -2846,6 +2846,11 @@ static void cgltf_parse_attribute_type(const char* name, cgltf_attribute_type* o
if (us && *out_type != cgltf_attribute_type_invalid)
{
*out_index = CGLTF_ATOI(us + 1);
if (*out_index < 0)
{
*out_type = cgltf_attribute_type_invalid;
*out_index = 0;
}
}
}

Expand Down

0 comments on commit b164248

Please sign in to comment.