summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Jackson <[email protected]>2006-04-03 00:18:03 +0000
committerAdam Jackson <[email protected]>2006-04-03 00:18:03 +0000
commitb927a75979f9bbabca6e3b2601f222d29d70df49 (patch)
tree4cba18255ef47d91c18d45c9105858796b50ca19
parent5ab5517ba8d2d0b4d590b5fe864797b8a8241cc5 (diff)
Coverity #459: Silly off-by-one error.
-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;
}