summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2013-01-09 15:42:21 -0600
committerTim Angus <tim@ngus.net>2013-01-12 21:35:59 +0000
commit94c09c3bae146f0bdf6e9f30497db07ea1c378db (patch)
tree53a4dc92d5fe80d1bfcdfd699c2b8bc38f68eca1
parenteb437801c97f9c3fc28af97154cfea0d31ccf288 (diff)
Don't look for colors past win32 input line length
-rw-r--r--src/sys/con_win32.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sys/con_win32.c b/src/sys/con_win32.c
index d4305837..51b9e373 100644
--- a/src/sys/con_win32.c
+++ b/src/sys/con_win32.c
@@ -196,11 +196,13 @@ static void CON_Show( void )
// build a space-padded CHAR_INFO array
for( i = 0; i < MAX_EDIT_LINE; i++ )
{
- if( Q_IsColorString( qconsole_line + i ) )
- attrib = CON_ColorCharToAttrib( *( qconsole_line + i + 1 ) );
-
if( i < qconsole_linelen )
+ {
+ if( Q_IsColorString( qconsole_line + i ) )
+ attrib = CON_ColorCharToAttrib( *( qconsole_line + i + 1 ) );
+
line[ i ].Char.AsciiChar = qconsole_line[ i ];
+ }
else
line[ i ].Char.AsciiChar = ' ';