From 60111d3f0f96473364367fddc6c546763279e63e Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 26 May 2014 23:05:22 +0200 Subject: 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. --- video/out/gl_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/gl_common.c b/video/out/gl_common.c index e363206b08..d9bd3d4286 100644 --- a/video/out/gl_common.c +++ b/video/out/gl_common.c @@ -502,7 +502,7 @@ void mpgl_load_functions(GL *gl, void *(*getProcAddress)(const GLubyte *), if (!gl->GetString) gl->GetString = glGetString; - 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); -- cgit v1.2.3