[Mesa-dev] [PATCH mesa 5/5] egl: remove space at the end of extension string

Eric Engestrom eric at engestrom.ch
Wed Mar 1 23:31:54 UTC 2017


Signed-off-by: Eric Engestrom <eric at engestrom.ch>
---
 src/egl/main/eglapi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 2d7077f88b..a7a1976535 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -529,6 +529,10 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
    _EGL_CHECK_EXTENSION(WL_bind_wayland_display);
    _EGL_CHECK_EXTENSION(WL_create_wayland_buffer_from_image);
 
+   /* exts point at the null after the space after the last extension
+    * let's remove that space */
+   *(exts-1) = '\0';
+
    assert(max_extstr_length < _EGL_MAX_EXTENSIONS_LEN);
 
 #undef _EGL_CHECK_EXTENSION
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list