From d0fcdc955e0f2242d6f4bd0250efd905cc399279 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 4 Jul 2016 15:34:19 +0100 Subject: [PATCH] shared/platform.h: use weston_check_egl_extension over strstr The later can give false positives. Signed-off-by: Emil Velikov Reviewed-by: Daniel Stone --- shared/platform.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/platform.h b/shared/platform.h index 77c82599..e0ed55bc 100644 --- a/shared/platform.h +++ b/shared/platform.h @@ -88,9 +88,9 @@ weston_platform_get_egl_proc_address(const char *address) { const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); - if (extensions - && (strstr(extensions, "EGL_EXT_platform_wayland") - || strstr(extensions, "EGL_KHR_platform_wayland"))) { + if (extensions && + (weston_check_egl_extension(extensions, "EGL_EXT_platform_wayland") || + weston_check_egl_extension(extensions, "EGL_KHR_platform_wayland"))) { return (void *) eglGetProcAddress(address); }