mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
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>
This commit is contained in:
parent
821e366385
commit
62b224d428
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue