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