[PATCH] WineD3D: Fix a copy and paste bug=0A=

Stefan Doesinger stefan at codeweavers.com
Thu Jul 10 13:38:35 CDT 2008

This happened to work because most cards have the same amount of=0A=
pshader and vshader constants, but for some reason this doesn't=0A=
hold true on this macbook pro here, which lead to a crash due to=0A=
heap corruption=0A=
 dlls/wined3d/device.c |    4 ++--=0A=
 1 files changed, 2 insertions(+), 2 deletions(-)=0A=
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c=0A=
index 131e1b7..b3db3b7 100644=0A=
--- a/dlls/wined3d/device.c=0A=
+++ b/dlls/wined3d/device.c=0A=
@@ -459,11 +459,11 @@ static HRESULT WINAPI =
IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface,=0A=
         object->changed.pixelShader =3D TRUE;=0A=
         /* Pixel Shader Constants */=0A=
-        for (i =3D 0; i < GL_LIMITS(vshader_constantsF); ++i) {=0A=
+        for (i =3D 0; i < GL_LIMITS(pshader_constantsF); ++i) {=0A=
             object->contained_ps_consts_f[i] =3D i;=0A=
             object->changed.pixelShaderConstantsF[i] =3D TRUE;=0A=
-        object->num_contained_ps_consts_f =3D =
+        object->num_contained_ps_consts_f =3D =
         for (i =3D 0; i < MAX_CONST_B; ++i) {=0A=
             object->contained_ps_consts_b[i] =3D i;=0A=
             object->changed.pixelShaderConstantsB[i] =3D TRUE;=0A=
-- =0A=


More information about the wine-patches mailing list