From 5e4a9e2690bb8929a41a1967b70664e409e0256c Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Mon, 2 Nov 2009 01:08:39 +0000 Subject: * Fix colour codes not being propogated across lines in some cases (Rezyn0) --- src/ui/ui_shared.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c index 817f573e..0a416282 100644 --- a/src/ui/ui_shared.c +++ b/src/ui/ui_shared.c @@ -4395,10 +4395,6 @@ const char *Item_Text_Wrap( const char *text, float scale, float width ) paint[ eol - p ] = '\0'; p = eol; - // Skip leading whitespace on next line and save the - // last color code - SkipWhiteSpace( &p, c ); - if( out[ strlen( out ) - 1 ] == '\n' ) { // The line is deliberately broken, clear the color @@ -4408,6 +4404,10 @@ const char *Item_Text_Wrap( const char *text, float scale, float width ) { // Add a \n if it's not there already Q_strcat( out, sizeof( out ), "\n" ); + + // Skip leading whitespace on next line and save the + // last color code + SkipWhiteSpace( &p, c ); } Q_strcat( out, sizeof( out ), c ); -- cgit