summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-26 23:05:22 +0200
committerwm4 <wm4@nowhere>2014-05-26 23:05:22 +0200
commit66f3e93ed363a262cfa2f5b4cffe9ec365a3ce02 (patch)
tree1287e78d4233629a3d66267972106536df99dfc1
parent53445d3b44e36fa87bae453ba9fca05f39b753a9 (diff)
downloadmpv-66f3e93ed363a262cfa2f5b4cffe9ec365a3ce02.tar.bz2
mpv-66f3e93ed363a262cfa2f5b4cffe9ec365a3ce02.tar.xz
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.
-rw-r--r--video/out/gl_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/gl_common.c b/video/out/gl_common.c
index 29d8a6b876..82f5e2ac98 100644
--- a/video/out/gl_common.c
+++ b/video/out/gl_common.c
@@ -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);