d3dx9: Improve check for empty braces for elements.

This commit is contained in:
Rico Schüller 2012-08-18 14:58:52 +02:00 committed by Alexandre Julliard
parent 07ae14ad4c
commit 607c76a165
1 changed files with 2 additions and 1 deletions

View File

@ -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]);