summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/common/glcontextmodes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/common/glcontextmodes.c b/src/mesa/drivers/dri/common/glcontextmodes.c
index d1297991497..f9e6715fcd2 100644
--- a/src/mesa/drivers/dri/common/glcontextmodes.c
+++ b/src/mesa/drivers/dri/common/glcontextmodes.c
@@ -104,7 +104,7 @@ _gl_convert_to_x_visual_type( int visualType )
GrayScale, StaticGray
};
- return ( (unsigned) (visualType - GLX_TRUE_COLOR) <= NUM_VISUAL_TYPES )
+ return ( (unsigned) (visualType - GLX_TRUE_COLOR) < NUM_VISUAL_TYPES )
? x_visual_types[ visualType - GLX_TRUE_COLOR ] : -1;
}