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:
committed by
Eric Engestrom
parent
3fb7b1fd35
commit
773ff93bc4
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user