d3dx9: Limit constant size by register count instead of table size.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Paul Gofman 2017-06-02 12:58:05 +03:00 committed by Alexandre Julliard
parent 99e0442acc
commit ef22e6f0da
1 changed files with 4 additions and 3 deletions

View File

@ -1070,14 +1070,15 @@ static void set_constants(struct d3dx_regstore *rs, struct d3dx_const_tab *const
unsigned int *in;
unsigned int offset;
offset = start_offset + i * info.major_stride + j;
if (get_reg_offset(table, offset) >= rs->table_sizes[table])
offset = i * info.major_stride + j;
if (get_reg_offset(table, offset) >= const_set->register_count)
{
if (table != PRES_REGTAB_OBCONST)
FIXME("Output offset exceeds table size, name %s, component %u.\n",
FIXME("Output offset exceeds regiser count, name %s, component %u.\n",
debugstr_a(param->name), i);
break;
}
offset += start_offset;
if (info.transpose)
param_offset = i + j * info.major;
else