gl_common: correct a type

We pass a pointer to a GLint to sscanf, using the %d format. That format
_always_ takes int, and not GLint (whatever the heck that is). If GLint
is always int, then it doesn't make a difference, but is still better
because it doesn't play russian roulette with pointers.
This commit is contained in:
wm4 2014-05-26 23:05:22 +02:00
parent 53445d3b44
commit 66f3e93ed3
1 changed files with 1 additions and 1 deletions

View File

@ -499,7 +499,7 @@ void mpgl_load_functions(GL *gl, void *(*getProcAddress)(const GLubyte *),
return;
}
GLint major = 0, minor = 0;
int major = 0, minor = 0;
const char *version = gl->GetString(GL_VERSION);
sscanf(version, "%d.%d", &major, &minor);
gl->version = MPGL_VER(major, minor);