From 610225b451db0e76bbecfbdcc75b4af465be7ef7 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 28 Jun 2014 19:51:26 -0700 Subject: [PATCH] Fixed null terminating the X11 error string --- src/video/x11/SDL_x11opengl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c index 1a56a7e0fb02e..1e94b041cd2e3 100644 --- a/src/video/x11/SDL_x11opengl.c +++ b/src/video/x11/SDL_x11opengl.c @@ -549,7 +549,7 @@ X11_GL_CreateContextErrorHandler(Display * d, XErrorEvent * e) errorCode = e->error_code; if (X11_XGetErrorText(d, errorCode, x11_error_locale, sizeof(x11_error_locale)) == Success) { - x11_error = SDL_iconv_string("UTF-8", "", x11_error_locale, strlen(x11_error_locale)); + x11_error = SDL_iconv_string("UTF-8", "", x11_error_locale, SDL_strlen(x11_error_locale)+1); } if (x11_error)