diff options
Diffstat (limited to 'code/unix')
-rw-r--r-- | code/unix/unix_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); } } } |