X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmswin%2Ffg_window_mswin.c;h=4365b8c6a243c553154f3d6d8ff52cf8c5bcb9bc;hb=0b5007df01a3f60ad5eb690c805153d6fa7760c0;hp=834250343c5f606a3da60b551724f7670df70bf4;hpb=6a60b56aaf6dc5d9b0d2dd81b20a568e74232a43;p=freeglut diff --git a/src/mswin/fg_window_mswin.c b/src/mswin/fg_window_mswin.c index 8342503..4365b8c 100644 --- a/src/mswin/fg_window_mswin.c +++ b/src/mswin/fg_window_mswin.c @@ -923,8 +923,7 @@ void fgPlatformGlutSetWindowTitle( const char* title ) /* Make copy of string to refer to later */ if (fgStructure.CurrentWindow->State.pWState.WindowTitle) free(fgStructure.CurrentWindow->State.pWState.WindowTitle); - fgStructure.CurrentWindow->State.pWState.WindowTitle = malloc (strlen(title) + 1); - strcpy(fgStructure.CurrentWindow->State.pWState.WindowTitle, title); + fgStructure.CurrentWindow->State.pWState.WindowTitle = strdup(title); } /* @@ -935,8 +934,7 @@ void fgPlatformGlutSetIconTitle( const char* title ) /* Make copy of string to refer to later */ if (fgStructure.CurrentWindow->State.pWState.IconTitle) free(fgStructure.CurrentWindow->State.pWState.IconTitle); - fgStructure.CurrentWindow->State.pWState.IconTitle = malloc (strlen(title) + 1); - strcpy(fgStructure.CurrentWindow->State.pWState.IconTitle, title); + fgStructure.CurrentWindow->State.pWState.IconTitle = strdup(title); } /*