From d66c05ce1de614febd922ad507d586cf09e78b7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 10 Jul 2008 13:38:35 -0500 Subject: [PATCH] wined3d: Fix a copy and paste bug. This happened to work because most cards have the same amount of pshader and vshader constants, but for some reason this doesn't hold true on this macbook pro here, which lead to a crash due to heap corruption --- dlls/wined3d/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 131e1b76fa0..b3db3b740c7 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -459,11 +459,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface, object->changed.pixelShader = TRUE; /* Pixel Shader Constants */ - for (i = 0; i < GL_LIMITS(vshader_constantsF); ++i) { + for (i = 0; i < GL_LIMITS(pshader_constantsF); ++i) { object->contained_ps_consts_f[i] = i; object->changed.pixelShaderConstantsF[i] = TRUE; } - object->num_contained_ps_consts_f = GL_LIMITS(vshader_constantsF); + object->num_contained_ps_consts_f = GL_LIMITS(pshader_constantsF); for (i = 0; i < MAX_CONST_B; ++i) { object->contained_ps_consts_b[i] = i; object->changed.pixelShaderConstantsB[i] = TRUE;