engine: sys_con: only allow names that start with either alphabetic or numerical character for a log file
This commit is contained in:
parent
f1a9d408bf
commit
89430400d9
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ void Sys_InitLog( void )
|
||||||
|
|
||||||
if( Sys_CheckParm( "-log" ))
|
if( Sys_CheckParm( "-log" ))
|
||||||
{
|
{
|
||||||
if( !Sys_GetParmFromCmdLine( "-log", s_ld.log_path ) || s_ld.log_path[0] == '-' )
|
if( !Sys_GetParmFromCmdLine( "-log", s_ld.log_path ) || !isalnum( s_ld.log_path[0] ))
|
||||||
Q_strncpy( s_ld.log_path, "engine.log", sizeof( s_ld.log_path ));
|
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 ));
|
COM_DefaultExtension( s_ld.log_path, ".log", sizeof( s_ld.log_path ));
|
||||||
|
|
Loading…
Add table
Reference in a new issue