Commit 6d1a76fb authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

wined3d: Fix (and simplify) the ATI case in IWineD3DImpl_FillGLCaps.

parent 7856ac3c
......@@ -615,21 +615,15 @@ static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
major = minor = 0;
gl_string_cursor = strchr(gl_string, '-');
if (gl_string_cursor) {
int error = 0;
gl_string_cursor++;
/* Check if version number is of the form x.y.z */
if (*gl_string_cursor > '9' && *gl_string_cursor < '0')
error = 1;
if (!error && *(gl_string_cursor+2) > '9' && *(gl_string_cursor+2) < '0')
error = 1;
if (!error && *(gl_string_cursor+4) > '9' && *(gl_string_cursor+4) < '0')
error = 1;
if (!error && *(gl_string_cursor+1) != '.' && *(gl_string_cursor+3) != '.')
error = 1;
if ( *gl_string_cursor < '0' || *gl_string_cursor > '9'
|| *(gl_string_cursor+1) != '.'
|| *(gl_string_cursor+2) < '0' || *(gl_string_cursor+2) > '9'
|| *(gl_string_cursor+3) != '.'
|| *(gl_string_cursor+4) < '0' || *(gl_string_cursor+4) > '9' )
/* Mark version number as malformed */
if (error)
gl_string_cursor = 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment