Nikolay Sivov : d3d10/effect: Use destination index when setting array property element.
Alexandre Julliard
julliard at winehq.org
Fri Oct 15 15:40:06 CDT 2021
Module: wine
Branch: master
Commit: c0e2138ed735fc42c74c65f08d90c07934e82701
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c0e2138ed735fc42c74c65f08d90c07934e82701
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu Oct 14 09:42:19 2021 +0300
d3d10/effect: Use destination index when setting array property element.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d10/effect.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
index 29d59f2620b..6fc69b0df39 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -1830,7 +1830,7 @@ static HRESULT parse_fx10_property_assignment(const char *data, size_t data_size
return E_FAIL;
}
- *(void **)dst = variable;
+ ((void **)dst)[idx] = variable;
}
else
{
@@ -1888,11 +1888,11 @@ static HRESULT parse_fx10_property_assignment(const char *data, size_t data_size
case D3D10_SVT_VERTEXSHADER:
case D3D10_SVT_PIXELSHADER:
case D3D10_SVT_GEOMETRYSHADER:
- *(void **)dst = variable;
+ ((void **)dst)[idx] = variable;
*dst_index = variable_idx;
break;
default:
- *(void **)dst = &variable->elements[variable_idx];
+ ((void **)dst)[idx] = &variable->elements[variable_idx];
}
}
else
@@ -1957,7 +1957,7 @@ static HRESULT parse_fx10_property_assignment(const char *data, size_t data_size
return E_FAIL;
}
- *(void **)dst = variable;
+ ((void **)dst)[idx] = variable;
break;
More information about the wine-cvs
mailing list