diff options
author | wm4 <wm4@nowhere> | 2014-05-26 23:05:22 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-05-26 23:05:22 +0200 |
commit | 66f3e93ed363a262cfa2f5b4cffe9ec365a3ce02 (patch) | |
tree | 1287e78d4233629a3d66267972106536df99dfc1 /video | |
parent | 53445d3b44e36fa87bae453ba9fca05f39b753a9 (diff) | |
download | mpv-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.
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 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); |