Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[MP] Don't allow condump with extensions besides .txt
  • Loading branch information
ensiform committed Nov 10, 2013
1 parent 58900c0 commit ef124fd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions codemp/client/cl_console.cpp
Expand Up @@ -157,6 +157,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)
{
Expand Down

0 comments on commit ef124fd

Please sign in to comment.