Changelog: - fix parsing of GL version string in X.Y cases -- Lionel Ulmer - http://www.bbrox.org/
--- dlls/ddraw_CVS/d3ddevice/mesa.c Sat Nov 8 23:52:06 2003 +++ dlls/ddraw/d3ddevice/mesa.c Sun Nov 9 00:07:30 2003 @@ -4036,7 +4036,7 @@ const char *glVersion; const char *glXExtensions = NULL; const void *(*pglXGetProcAddressARB)(const GLubyte *) = NULL; - int major, minor, patch; + int major, minor, patch, num_parsed; TRACE("Initializing GL...\n"); @@ -4081,7 +4081,13 @@ } /* Parse the GL version string */ - sscanf(glVersion, "%d.%d.%d", &major, &minor, &patch); + num_parsed = sscanf(glVersion, "%d.%d.%d", &major, &minor, &patch); + if (num_parsed == 1) { + minor = 0; + patch = 0; + } else if (num_parsed == 2) { + patch = 0; + } TRACE("GL version %d.%d.%d\n", major, minor, patch); /* And starts to fill the extension context properly */