diff --git a/source/vid_wgl.c b/source/vid_wgl.c index f54c0ba..1c5510e 100644 --- a/source/vid_wgl.c +++ b/source/vid_wgl.c @@ -1940,7 +1940,9 @@ void VID_MenuKey (int key) void VID_SetCaption (char *text) { if (text && *text) { - SetWindowText(mainwindow,(LPSTR) va ("%s %s: %s", PROGRAM, VERSION, text)); + char *temp = strdup (text); + SetWindowText(mainwindow,(LPSTR) va ("%s %s: %s", PROGRAM, VERSION, temp)); + free (temp); } else { SetWindowText(mainwindow,(LPSTR) va ("%s %s", PROGRAM, VERSION)); }