Christian Costa : d3dxof: Enable referencing of named subobjects too.
Alexandre Julliard
julliard at winehq.org
Wed Oct 8 08:32:43 CDT 2008
Module: wine
Branch: master
Commit: 06c8d49e3ec8ce419043ccc66edaa3f8720a6001
URL: http://source.winehq.org/git/wine.git/?a=commit;h=06c8d49e3ec8ce419043ccc66edaa3f8720a6001
Author: Christian Costa <titan.costa at wanadoo.fr>
Date: Tue Oct 7 22:54:09 2008 +0200
d3dxof: Enable referencing of named subobjects too.
---
dlls/d3dxof/d3dxof.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c
index a02f99b..af84ef8 100644
--- a/dlls/d3dxof/d3dxof.c
+++ b/dlls/d3dxof/d3dxof.c
@@ -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);
More information about the wine-cvs
mailing list