From ea766e6203111c814c7359e201cebb02953dbab9 Mon Sep 17 00:00:00 2001 From: Jeff Teunissen Date: Thu, 19 Oct 2000 18:07:00 +0000 Subject: [PATCH] Fix the VID_SetCaption () bug here too --- source/vid_wgl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); }