d3dxof: Template names are case insensitive.

This commit is contained in:
Christian Costa 2008-12-28 11:27:29 +01:00 committed by Alexandre Julliard
parent 87cc3e19bc
commit 0fea04afbf
1 changed files with 6 additions and 6 deletions

View File

@ -1088,13 +1088,13 @@ static BOOL parse_template_members_list(parse_buffer * buf)
cur_member->idx_template = 0; cur_member->idx_template = 0;
while (cur_member->idx_template < buf->pdxf->nb_xtemplates) while (cur_member->idx_template < buf->pdxf->nb_xtemplates)
{ {
if (!strcmp((char*)buf->value, buf->pdxf->xtemplates[cur_member->idx_template].name)) if (!strcasecmp((char*)buf->value, buf->pdxf->xtemplates[cur_member->idx_template].name))
break; break;
cur_member->idx_template++; cur_member->idx_template++;
} }
if (cur_member->idx_template == buf->pdxf->nb_xtemplates) if (cur_member->idx_template == buf->pdxf->nb_xtemplates)
{ {
TRACE("Reference to a nonexistent template '%s'\n", (char*)buf->value); ERR("Reference to a nonexistent template '%s'\n", (char*)buf->value);
return FALSE; return FALSE;
} }
} }
@ -1977,7 +1977,7 @@ static BOOL parse_object_members_list(parse_buffer * buf)
/* To do template lookup */ /* To do template lookup */
for (j = 0; j < buf->pdxf->nb_xtemplates; j++) for (j = 0; j < buf->pdxf->nb_xtemplates; j++)
{ {
if (!strcmp(buf->pdxf->xtemplates[pt->members[i].idx_template].name, buf->pdxf->xtemplates[j].name)) if (!strcasecmp(buf->pdxf->xtemplates[pt->members[i].idx_template].name, buf->pdxf->xtemplates[j].name))
{ {
buf->pxt[buf->level] = &buf->pdxf->xtemplates[j]; buf->pxt[buf->level] = &buf->pdxf->xtemplates[j];
break; break;
@ -1985,7 +1985,7 @@ static BOOL parse_object_members_list(parse_buffer * buf)
} }
if (j == buf->pdxf->nb_xtemplates) if (j == buf->pdxf->nb_xtemplates)
{ {
FIXME("Unknown template %s\n", (char*)buf->value); ERR("Unknown template %s\n", (char*)buf->value);
buf->level--; buf->level--;
return FALSE; return FALSE;
} }
@ -2186,7 +2186,7 @@ static BOOL parse_object(parse_buffer * buf)
/* To do template lookup */ /* To do template lookup */
for (i = 0; i < buf->pdxf->nb_xtemplates; i++) for (i = 0; i < buf->pdxf->nb_xtemplates; i++)
{ {
if (!strcmp((char*)buf->value, buf->pdxf->xtemplates[i].name)) if (!strcasecmp((char*)buf->value, buf->pdxf->xtemplates[i].name))
{ {
buf->pxt[buf->level] = &buf->pdxf->xtemplates[i]; buf->pxt[buf->level] = &buf->pdxf->xtemplates[i];
memcpy(&buf->pxo->type, &buf->pdxf->xtemplates[i].class_id, 16); memcpy(&buf->pxo->type, &buf->pdxf->xtemplates[i].class_id, 16);
@ -2195,7 +2195,7 @@ static BOOL parse_object(parse_buffer * buf)
} }
if (i == buf->pdxf->nb_xtemplates) if (i == buf->pdxf->nb_xtemplates)
{ {
FIXME("Unknown template %s\n", (char*)buf->value); ERR("Unknown template %s\n", (char*)buf->value);
return FALSE; return FALSE;
} }