From 9d9b160aea8abf40cee3d131d21bbad87d0c4ec6 Mon Sep 17 00:00:00 2001 From: tma Date: Tue, 28 Nov 2006 14:03:27 +0000 Subject: * Merge 954:955 from 1.34 branch git-svn-id: svn://svn.icculus.org/quake3/trunk@985 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/unix/unix_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'code/unix') diff --git a/code/unix/unix_main.c b/code/unix/unix_main.c index c432026..7f4b65c 100644 --- a/code/unix/unix_main.c +++ b/code/unix/unix_main.c @@ -1236,7 +1236,7 @@ void Sys_ANSIColorify( const char *msg, char *buffer, int bufferSize ) if( msg[ i ] == '\n' ) { Com_sprintf( tempBuffer, 7, "%c[0m\n", 0x1B ); - strncat( buffer, tempBuffer, bufferSize ); + strncat( buffer, tempBuffer, bufferSize - 1); i++; } else if( msg[ i ] == Q_COLOR_ESCAPE ) @@ -1258,7 +1258,7 @@ void Sys_ANSIColorify( const char *msg, char *buffer, int bufferSize ) if( escapeCode ) { Com_sprintf( tempBuffer, 7, "%c[%sm", 0x1B, escapeCode ); - strncat( buffer, tempBuffer, bufferSize ); + strncat( buffer, tempBuffer, bufferSize - 1); } i++; @@ -1267,7 +1267,7 @@ void Sys_ANSIColorify( const char *msg, char *buffer, int bufferSize ) else { Com_sprintf( tempBuffer, 7, "%c", msg[ i++ ] ); - strncat( buffer, tempBuffer, bufferSize ); + strncat( buffer, tempBuffer, bufferSize - 1); } } } -- cgit v1.2.3