2017-06-12 13:22 GMT+02:00 Paul Gofman <gofmanp(a)gmail.com>:
Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> --- dlls/d3dx9_36/preshader.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
diff --git a/dlls/d3dx9_36/preshader.c b/dlls/d3dx9_36/preshader.c index 2f9648d..1ca02c4 100644 --- a/dlls/d3dx9_36/preshader.c +++ b/dlls/d3dx9_36/preshader.c @@ -1101,6 +1101,12 @@ static void regstore_set_data(struct d3dx_regstore *rs, unsigned int table, }; enum pres_value_type table_type = table_info[table].type;
+ if (param_type == table_type) + { + regstore_set_values(rs, table, in, offset, count); + return; + }
Maybe it's a bit paranoid but I'd like an assert in regstore_set_values() ensuring that there is no overlap between destination and source of the memcpy(). That's clearly the case at the moment but it might become less obvious in the future.