diff options
author | Emil Velikov <emil.velikov@collabora.com> | 2016-09-01 10:36:44 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-09-05 11:59:07 +0100 |
commit | 62b224d428e04760dc96afb93873d67683337f88 (patch) | |
tree | 61bcd983c976ef037b6fb5bb6e7b1a81306e422b /src/glx | |
parent | 821e36638531ddadb32d5bac633c0b21c73bea67 (diff) | |
download | external_mesa3d-62b224d428e04760dc96afb93873d67683337f88.zip external_mesa3d-62b224d428e04760dc96afb93873d67683337f88.tar.gz external_mesa3d-62b224d428e04760dc96afb93873d67683337f88.tar.bz2 |
glx/glvnd: list the strcmp arguments in correct order
Currently, due to the inverse order, strcmp will produce negative result
when the needle is towards the start of the haystack. Thus on the next
iteration(s) we'll end up further towards the end and eventually fail to
locate the entry.
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/glxglvnd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glx/glxglvnd.c b/src/glx/glxglvnd.c index 962eda8..098304d 100644 --- a/src/glx/glxglvnd.c +++ b/src/glx/glxglvnd.c @@ -24,8 +24,8 @@ static unsigned FindGLXFunction(const GLubyte *name) while (first <= last) { int middle = (first + last) / 2; - int comp = strcmp((const char *) name, - __glXDispatchTableStrings[middle]); + int comp = strcmp(__glXDispatchTableStrings[middle], + (const char *) name); if (comp < 0) first = middle + 1; |