d3dx9: Improve check for empty braces for elements.
This commit is contained in:
parent
07ae14ad4c
commit
607c76a165
|
@ -975,7 +975,8 @@ static struct d3dx_parameter *get_parameter_element_by_name(struct d3dx_paramete
|
|||
element = atoi(name);
|
||||
part = strchr(name, ']') + 1;
|
||||
|
||||
if (parameter->element_count > element)
|
||||
/* check for empty [] && element range */
|
||||
if ((part - name) > 1 && parameter->element_count > element)
|
||||
{
|
||||
temp_parameter = get_parameter_struct(parameter->member_handles[element]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue