Merge some file writing extension checks from OpenJK.
Thanks Ensiform.05928a57f9
ef124fd0fc
This commit is contained in:
parent
f61fe5f6a0
commit
b173ac0599
2 changed files with 13 additions and 0 deletions
|
@ -191,6 +191,12 @@ void Con_Dump_f (void)
|
|||
Q_strncpyz( filename, Cmd_Argv( 1 ), sizeof( filename ) );
|
||||
COM_DefaultExtension( filename, sizeof( filename ), ".txt" );
|
||||
|
||||
if (!COM_CompareExtension(filename, ".txt"))
|
||||
{
|
||||
Com_Printf("Con_Dump_f: Only the \".txt\" extension is supported by this command!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
f = FS_FOpenFileWrite( filename );
|
||||
if (!f)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue