summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-06-06 21:30:49 +0100
committerEric Engestrom <[email protected]>2019-06-11 12:18:09 +0000
commit773ff93bc4b51c051f49c1c5198f56f5cea6665b (patch)
tree5677b75f3ca2c1d45210fafb6d2a91b59cecefaa
parent3fb7b1fd350246c09ef014a9fb8a04728d66e88a (diff)
egl: compare the whole list of attributes
`memcmp()` compares a given number of bytes, but `EGLAttrib` is larger than a byte. Fixes: 8e991ce5397598ceb422 "egl: handle the full attrib list in display::options" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
-rw-r--r--src/egl/main/egldisplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index 91655b73454..f09b2e96403 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -232,7 +232,7 @@ _eglSameAttribs(const EGLAttrib *a, const EGLAttrib *b)
return EGL_TRUE;
/* otherwise, compare the lists */
- return memcmp(a, b, na) == 0 ? EGL_TRUE : EGL_FALSE;
+ return memcmp(a, b, na * sizeof(a[0])) == 0 ? EGL_TRUE : EGL_FALSE;
}
/**