diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index 8f2e33a40..9e0dd6ea6 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -5979,7 +5979,7 @@ static void COM_HWR_glinfo(void) // if the GPU is super new and supports a bajillion extensions - xyzzy char *copy = strdup((const char*)gl_extensions); - char *ext = strtok(copy, " "); + char *ext; if (copy == NULL) { @@ -5987,6 +5987,8 @@ static void COM_HWR_glinfo(void) return; } + ext = strtok(copy, " "); + do { CONS_Printf(" - %s\n", ext); diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index d50cdbe93..46af6e178 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -137,13 +137,13 @@ boolean OglSdlSurface(INT32 w, INT32 h) GL_DBG_Printf("OpenGL %s\n", gl_version); GL_DBG_Printf("GPU: %s\n", gl_renderer); - GL_DBG_Printf("Extensions:"); + GL_DBG_Printf("Extensions: \n"); { // Need to do it with strtok for same reason its done like that in gr_glinfo command char *copy = strdup((const char*)gl_extensions); - char *ext = strtok(copy, " "); + char *ext; if (copy == NULL) { @@ -151,9 +151,11 @@ boolean OglSdlSurface(INT32 w, INT32 h) } else { + ext = strtok(copy, " "); + do { - GL_DBG_Printf(" %s", ext); + GL_DBG_Printf(" - %s\n", ext); } while ((ext = strtok(NULL, " ")) != NULL); free(copy);