medfall

A super great game engine
Log | Files | Refs

commit 9445e376c611796aa96fa3c28e08cd63a6cfca75
parent ad3e9bd96101eca243426a5643d053c66f3b23d0
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Fri May 12 02:38:55 +0300

Don't append a newline to logs if there already is one

Diffstat:
log.cc | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/log.cc b/log.cc @@ -96,7 +96,9 @@ void logger_log( LogLevel level, const char * message ) { buf += " "; buf += message; - buf += "\n"; + if( buf[ buf.len() - 1 ] != '\n' ) { + buf += "\n"; + } FILE * console_stream = level == LOGLEVEL_INFO ? stdout : stderr; {