mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-29 16:24:16 +00:00
engine: common: fix message formating
This commit is contained in:
parent
0c34a5081c
commit
934dffd273
@ -225,15 +225,15 @@ void Sys_PrintLog( const char *pMsg )
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// save last char to detect when line was not ended
|
||||||
|
lastchar = pMsg[strlen(pMsg)-1];
|
||||||
|
|
||||||
if( !s_ld.logfile )
|
if( !s_ld.logfile )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( !lastchar || lastchar == '\n')
|
if( !lastchar || lastchar == '\n')
|
||||||
strftime( logtime, sizeof( logtime ), "[%Y:%m:%d|%H:%M:%S]", crt_tm ); //full time
|
strftime( logtime, sizeof( logtime ), "[%Y:%m:%d|%H:%M:%S]", crt_tm ); //full time
|
||||||
|
|
||||||
// save last char to detect when line was not ended
|
|
||||||
lastchar = pMsg[strlen(pMsg)-1];
|
|
||||||
|
|
||||||
fprintf( s_ld.logfile, "%s %s", logtime, pMsg );
|
fprintf( s_ld.logfile, "%s %s", logtime, pMsg );
|
||||||
fflush( s_ld.logfile );
|
fflush( s_ld.logfile );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user