mirror of https://github.com/mpv-player/mpv
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:
parent
53445d3b44
commit
66f3e93ed3
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue