mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 06:10:13 +01:00
Coverity #459: Silly off-by-one error.
This commit is contained in:
parent
5ab5517ba8
commit
b927a75979
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue