Commit 39772f97 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

d3dxof: Enable referencing objects defined in current top-level object.

parent 24d6c0a9
...@@ -1198,7 +1198,7 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional) ...@@ -1198,7 +1198,7 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional)
if (get_TOKEN(buf) != TOKEN_CBRACE) if (get_TOKEN(buf) != TOKEN_CBRACE)
return FALSE; return FALSE;
TRACE("Found optional reference %s\n", (char*)buf->value); TRACE("Found optional reference %s\n", (char*)buf->value);
for (i = 0; i < buf->nb_pxo_globals; i++) for (i = 0; i < (buf->nb_pxo_globals+1); i++)
{ {
for (j = 0; j < (buf->pxo_globals[i])[0].nb_subobjects; j++) for (j = 0; j < (buf->pxo_globals[i])[0].nb_subobjects; j++)
{ {
...@@ -1207,7 +1207,7 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional) ...@@ -1207,7 +1207,7 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional)
} }
} }
_exit: _exit:
if (i == buf->nb_pxo_globals) if (i == (buf->nb_pxo_globals+1))
{ {
ERR("Reference to unknown object %s\n", (char*)buf->value); ERR("Reference to unknown object %s\n", (char*)buf->value);
return FALSE; return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment