mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-29 07:06:59 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user