From be4d2f57ea32e9756b61e3581171663fb39f0d8d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 4 Dec 2001 17:12:16 +0000 Subject: [PATCH] clean up Con_Print a smidge --- qw/source/console.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/qw/source/console.c b/qw/source/console.c index 286d78710..301f17f49 100644 --- a/qw/source/console.c +++ b/qw/source/console.c @@ -314,14 +314,10 @@ Con_Print (const char *fmt, va_list args) int mask, c, l, y; static int cr; static char txt[1024]; - const char *s; + char *s; vsnprintf (txt, sizeof (txt), fmt, args); - // echo to debugging console - for (s = txt; *s; s++) - fputc (sys_char_map[(byte)*s], stdout); - // log all messages to file if (con_debuglog) Sys_DebugLog (va ("%s/qconsole.log", com_gamedir), "%s", txt); @@ -337,7 +333,7 @@ Con_Print (const char *fmt, va_list args) } else mask = 0; - while ((c = *s)) { + while ((c = (byte)*s)) { // count word length for (l = 0; l < con_linewidth; l++) if (s[l] <= ' ') @@ -347,7 +343,7 @@ Con_Print (const char *fmt, va_list args) if (l != con_linewidth && (con->x + l > con_linewidth)) con->x = 0; - s++; + *s++ = sys_char_map[c]; if (cr) { con->current--; @@ -382,6 +378,9 @@ Con_Print (const char *fmt, va_list args) } } + + // echo to debugging console + fputs (txt, stdout); } /* DRAWING */