egl: compare the whole list of attributes

`memcmp()` compares a given number of bytes, but `EGLAttrib` is larger than a byte.

Fixes: 8e991ce539 "egl: handle the full attrib list in display::options"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
Eric Engestrom 2019-06-06 21:30:49 +01:00 committed by Eric Engestrom
parent 3fb7b1fd35
commit 773ff93bc4
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
/**