summaryrefslogtreecommitdiff
path: root/source/cl_locs.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-08-02 14:26:44 +0000
committerAndrey Nazarov <skuller@skuller.net>2010-08-02 14:26:44 +0000
commit5c73f165141b30d93309d25e1324bc0170eb4da5 (patch)
treed84f0c561cff6c9549f3f618f943f7fa15704c71 /source/cl_locs.c
parent3c5ecddd3696c142bf730e808c8184511b525ae3 (diff)
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.
Diffstat (limited to 'source/cl_locs.c')
-rw-r--r--source/cl_locs.c10
1 files changed, 5 insertions, 5 deletions
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;