From 5c73f165141b30d93309d25e1324bc0170eb4da5 Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Mon, 2 Aug 2010 14:26:44 +0000 Subject: Made Q_ClearStr operate in place and renamed it to COM_strclr. Removed unused Q_HightlightStr function. Changed Q_ prefix on several functions to COM_ for consistency. Clear the message string before passing it to Cmd_ExecTrigger. --- source/cl_locs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/cl_locs.c') diff --git a/source/cl_locs.c b/source/cl_locs.c index 71cef2d..8a08359 100644 --- a/source/cl_locs.c +++ b/source/cl_locs.c @@ -44,13 +44,13 @@ LOC_Alloc static location_t *LOC_Alloc( const char *name ) { location_t *loc; char buffer[MAX_QPATH]; - size_t length; + size_t len; - Q_ClearStr( buffer, name, sizeof( buffer ) ); + Q_strlcpy( buffer, name, sizeof( buffer ) ); + len = COM_strclr( buffer ); - length = strlen( buffer ); - loc = Z_Malloc( sizeof( *loc ) + length ); - memcpy( loc->name, buffer, length + 1 ); + loc = Z_Malloc( sizeof( *loc ) + len ); + memcpy( loc->name, buffer, len + 1 ); List_Append( &cl_locations, &loc->entry ); return loc; -- cgit v1.2.3