Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/d3dx9_36/effect.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index bbbfb45a5e..992d7b466f 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -153,7 +153,6 @@ struct d3dx9_base_effect struct d3dx_effect *effect;
UINT technique_count; - UINT object_count;
struct d3dx_top_level_parameter *parameters; struct d3dx_technique *techniques; @@ -176,6 +175,7 @@ struct d3dx_effect
struct d3dx9_base_effect base_effect; unsigned int parameter_count; + unsigned int object_count;
struct ID3DXEffectStateManager *manager; struct IDirect3DDevice9 *device; @@ -707,7 +707,7 @@ static void d3dx9_base_effect_cleanup(struct d3dx9_base_effect *base)
if (base->objects) { - for (i = 0; i < base->object_count; ++i) + for (i = 0; i < base->effect->object_count; ++i) { free_object(&base->objects[i]); } @@ -6270,10 +6270,10 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U
skip_dword_unknown(&ptr, 1);
- read_dword(&ptr, &base->object_count); - TRACE("Object count: %u.\n", base->object_count); + read_dword(&ptr, &effect->object_count); + TRACE("Object count: %u.\n", effect->object_count);
- base->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*base->objects) * base->object_count); + base->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*base->objects) * effect->object_count); if (!base->objects) { ERR("Out of memory.\n"); @@ -6399,7 +6399,7 @@ err_out:
if (base->objects) { - for (i = 0; i < base->object_count; ++i) + for (i = 0; i < effect->object_count; ++i) { free_object(&base->objects[i]); }
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=48784
Your paranoid android.
=== debian9 (build log) ===
error: patch failed: dlls/d3dx9_36/effect.c:1163 Task: Patch failed to apply
=== debian9 (build log) ===
error: patch failed: dlls/d3dx9_36/effect.c:1163 Task: Patch failed to apply