d3dxof: Enable referencing of named subobjects too.

This commit is contained in:
Christian Costa 2008-10-07 22:54:09 +02:00 committed by Alexandre Julliard
parent 9d64f82554
commit 06c8d49e3e
1 changed files with 7 additions and 3 deletions

View File

@ -1843,7 +1843,7 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional)
{
if (check_TOKEN(buf) == TOKEN_OBRACE)
{
int i;
int i, j;
get_TOKEN(buf);
if (get_TOKEN(buf) != TOKEN_NAME)
return FALSE;
@ -1852,9 +1852,13 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional)
TRACE("Found optional reference %s\n", (char*)buf->value);
for (i = 0; i < buf->nb_pxo_globals; i++)
{
if (!strcmp(buf->pxo_globals[i*MAX_SUBOBJECTS].name, (char*)buf->value))
break;
for (j = 0; j < buf->pxo_globals[i*MAX_SUBOBJECTS].nb_subobjects; j++)
{
if (!strcmp(buf->pxo_globals[i*MAX_SUBOBJECTS+j].name, (char*)buf->value))
goto _exit;
}
}
_exit:
if (i == buf->nb_pxo_globals)
{
ERR("Reference to unknown object %s\n", (char*)buf->value);