diff options
author | wm4 <wm4@nowhere> | 2014-05-26 23:05:22 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-14 13:50:18 +0200 |
commit | 60111d3f0f96473364367fddc6c546763279e63e (patch) | |
tree | 564bbce5d4b764c13f8e42a8a88a206c432ffc64 /video | |
parent | 2f86a06528ab971822a1c8b9a217ee1f29f50d71 (diff) | |
download | mpv-60111d3f0f96473364367fddc6c546763279e63e.tar.bz2 mpv-60111d3f0f96473364367fddc6c546763279e63e.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.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/gl_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |