Fixed null terminating the X11 error string
authorSam Lantinga <slouken@libsdl.org>
Sat, 28 Jun 2014 19:51:26 -0700
changeset 89678ca9ce569f65
parent 8966 5771ab3290d6
child 8968 47decd0106f8
Fixed null terminating the X11 error string
src/video/x11/SDL_x11opengl.c
     1.1 --- a/src/video/x11/SDL_x11opengl.c	Sat Jun 28 13:05:16 2014 -0300
     1.2 +++ b/src/video/x11/SDL_x11opengl.c	Sat Jun 28 19:51:26 2014 -0700
     1.3 @@ -549,7 +549,7 @@
     1.4      errorCode = e->error_code;
     1.5      if (X11_XGetErrorText(d, errorCode, x11_error_locale, sizeof(x11_error_locale)) == Success)
     1.6      {
     1.7 -        x11_error = SDL_iconv_string("UTF-8", "", x11_error_locale, strlen(x11_error_locale));
     1.8 +        x11_error = SDL_iconv_string("UTF-8", "", x11_error_locale, SDL_strlen(x11_error_locale)+1);
     1.9      }
    1.10  
    1.11      if (x11_error)