diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-01-22 19:38:50 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-01-22 19:38:50 +0000 |
commit | 23855be9b239cd11e93adf7c58446160d745f09f (patch) | |
tree | c62e8ffe00e78fc307c5f871b523ebb7abee52d1 /code/unix | |
parent | 81f5c7f493912f6ee39a1bcd5c244e8321351d48 (diff) | |
download | ioquake3-aero-23855be9b239cd11e93adf7c58446160d745f09f.tar.gz ioquake3-aero-23855be9b239cd11e93adf7c58446160d745f09f.zip |
* The use of va in the ansi color stuff was preventing developer 1 mode (and
probably various other things) from working properly
git-svn-id: svn://svn.icculus.org/quake3/trunk@517 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/unix')
-rw-r--r-- | code/unix/unix_main.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/code/unix/unix_main.c b/code/unix/unix_main.c index 8cd0886..7b3a85e 100644 --- a/code/unix/unix_main.c +++ b/code/unix/unix_main.c @@ -1221,6 +1221,7 @@ void Sys_ANSIColorify( const char *msg, char *buffer, int bufferSize ) int msgLength, pos; int i, j; char *escapeCode; + char tempBuffer[ 7 ]; if( !msg || !buffer ) return; @@ -1234,7 +1235,8 @@ void Sys_ANSIColorify( const char *msg, char *buffer, int bufferSize ) { if( msg[ i ] == '\n' ) { - strncat( buffer, va( "%c[0m\n", 0x1B ), bufferSize ); + Com_sprintf( tempBuffer, 7, "%c[0m\n", 0x1B ); + strncat( buffer, tempBuffer, bufferSize ); i++; } else if( msg[ i ] == Q_COLOR_ESCAPE ) @@ -1254,13 +1256,19 @@ void Sys_ANSIColorify( const char *msg, char *buffer, int bufferSize ) } if( escapeCode ) - strncat( buffer, va( "%c[%sm", 0x1B, escapeCode ), bufferSize ); + { + Com_sprintf( tempBuffer, 7, "%c[%sm", 0x1B, escapeCode ); + strncat( buffer, tempBuffer, bufferSize ); + } i++; } } else - strncat( buffer, va( "%c", msg[ i++ ] ), bufferSize ); + { + Com_sprintf( tempBuffer, 7, "%c", msg[ i++ ] ); + strncat( buffer, tempBuffer, bufferSize ); + } } } |