Fix the VID_SetCaption () bug here too

This commit is contained in:
Jeff Teunissen 2000-10-19 18:07:00 +00:00
parent f837616025
commit ea766e6203

View file

@ -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));
}