From 62b5c602821cee8ac703ebe6362f3e1fc6d9ad3c Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 29 Mar 2014 20:08:31 -0400 Subject: misc: Add string utility functions. It's more readable to write "M_StringEndsWith(..." than doing a bunch of pointer arithmetic, and this is a common pattern. Also add M_StringStartsWith, M_StringJoin and M_StringCopy. The latter is a safe alternative for strcpy() that works the same as OpenBSD's strlcpy(). Use these functions in a few places where it makes sense. --- src/setup/mainmenu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/setup/mainmenu.c') diff --git a/src/setup/mainmenu.c b/src/setup/mainmenu.c index 8e5ebdad..81688b29 100644 --- a/src/setup/mainmenu.c +++ b/src/setup/mainmenu.c @@ -329,7 +329,7 @@ static void SetWindowTitle(void) TXT_SetDesktopTitle(title); - Z_Free(title); + free(title); } // Initialize the textscreen library. -- cgit v1.2.3