diff --git a/cgltf.h b/cgltf.h index ddec501..5a6bb46 100644 --- a/cgltf.h +++ b/cgltf.h @@ -2810,6 +2810,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; + } } }