Henri Verbeet : wined3d: Don' t use a start index higher than MAX_COMBINED_SAMPLERS - 1 in device_map_vsamplers ().

Alexandre Julliard julliard at winehq.org
Mon Aug 17 11:23:59 CDT 2009


Module: wine
Branch: master
Commit: 8cf7aa2bdd2b953950bcd4d51b0c82646eafc26f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8cf7aa2bdd2b953950bcd4d51b0c82646eafc26f

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Aug 17 09:39:05 2009 +0200

wined3d: Don't use a start index higher than MAX_COMBINED_SAMPLERS - 1 in device_map_vsamplers().

---

 dlls/wined3d/device.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index c9e50d1..92d6ffd 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3769,7 +3769,7 @@ static void device_map_vsamplers(IWineD3DDeviceImpl *This, BOOL ps) {
     const WINED3DSAMPLER_TEXTURE_TYPE *vshader_sampler_type =
             ((IWineD3DVertexShaderImpl *)This->stateBlock->vertexShader)->baseShader.reg_maps.sampler_type;
     const WINED3DSAMPLER_TEXTURE_TYPE *pshader_sampler_type = NULL;
-    int start = GL_LIMITS(combined_samplers) - 1;
+    int start = min(MAX_COMBINED_SAMPLERS, GL_LIMITS(combined_samplers)) - 1;
     int i;
 
     if (ps) {




More information about the wine-cvs mailing list