engine: sys_con: check if the next argument after -log starts with minus and ignore it if it does

This commit is contained in:
Alibek Omarov
2025-02-14 00:50:01 +03:00
parent 6529692244
commit f1a9d408bf
+1 -1
View File
@@ -81,7 +81,7 @@ void Sys_InitLog( void )
if( Sys_CheckParm( "-log" ))
{
if( !Sys_GetParmFromCmdLine( "-log", s_ld.log_path ))
if( !Sys_GetParmFromCmdLine( "-log", s_ld.log_path ) || s_ld.log_path[0] == '-' )
Q_strncpy( s_ld.log_path, "engine.log", sizeof( s_ld.log_path ));
COM_DefaultExtension( s_ld.log_path, ".log", sizeof( s_ld.log_path ));