mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fix an access violation that would occur when opening the logfile before com_version is created (#708)
This commit is contained in:
parent
94cc77b848
commit
f9db0ab8f9
1 changed files with 5 additions and 1 deletions
|
@ -274,10 +274,13 @@ void QDECL Com_Printf( const char *fmt, ... ) {
|
|||
|
||||
logfile = FS_FOpenTextFileWrite( "qconsole.log" );
|
||||
|
||||
// Remove recursive count as it won't be able to print relevant info
|
||||
recursive_count--;
|
||||
if(logfile)
|
||||
{
|
||||
Com_Printf( "logfile opened on %s\n", asctime( newtime ) );
|
||||
Com_Printf( "=> game is version %s\n", com_version->string );
|
||||
Com_Printf( "=> game is version %s\n", PRODUCT_NAME PRODUCT_VERSION_FULL PLATFORM_STRING PRODUCT_VERSION_DATE );
|
||||
Com_Printf( "=> targeting game ID %d\n", Cvar_VariableIntegerValue( "com_target_game" ) );
|
||||
|
||||
if ( com_logfile->integer > 1 )
|
||||
{
|
||||
|
@ -291,6 +294,7 @@ void QDECL Com_Printf( const char *fmt, ... ) {
|
|||
Com_Printf("Opening qconsole.log failed!\n");
|
||||
Cvar_SetValue("logfile", 0);
|
||||
}
|
||||
recursive_count++;
|
||||
|
||||
opening_qconsole = qfalse;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue