mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fix timestamps printed twice on the same line (#714)
This commit is contained in:
parent
aa54e3c673
commit
42326ec708
1 changed files with 43 additions and 41 deletions
|
@ -304,6 +304,7 @@ void QDECL Com_Printf( const char *fmt, ... ) {
|
||||||
//================
|
//================
|
||||||
size_t msgLen = strlen(msg);
|
size_t msgLen = strlen(msg);
|
||||||
|
|
||||||
|
if (msgLen > 0) {
|
||||||
if (com_logfile_timestamps->integer) {
|
if (com_logfile_timestamps->integer) {
|
||||||
static qboolean no_newline = qfalse;
|
static qboolean no_newline = qfalse;
|
||||||
|
|
||||||
|
@ -342,7 +343,7 @@ void QDECL Com_Printf( const char *fmt, ... ) {
|
||||||
FS_Write("] ", 2, logfile);
|
FS_Write("] ", 2, logfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msgLen > 1 && msg[msgLen - 1] != '\n') {
|
if (msg[msgLen - 1] != '\n') {
|
||||||
// Don't write the time if the previous message has no newline
|
// Don't write the time if the previous message has no newline
|
||||||
no_newline = qtrue;
|
no_newline = qtrue;
|
||||||
} else {
|
} else {
|
||||||
|
@ -354,6 +355,7 @@ void QDECL Com_Printf( const char *fmt, ... ) {
|
||||||
FS_Write(msg, msgLen, logfile);
|
FS_Write(msg, msgLen, logfile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
recursive_count--;
|
recursive_count--;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue