Skip to content

Commit

Permalink
when using the condump command, do not say "dumped console text" prem…
Browse files Browse the repository at this point in the history
…aturely, before trying to open the file
  • Loading branch information
/dev/humancontroller authored and zturtleman committed May 30, 2013
1 parent a8ce301 commit 1d0a044
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/client/cl_console.c
Expand Up @@ -191,15 +191,15 @@ void Con_Dump_f (void)
Q_strncpyz( filename, Cmd_Argv( 1 ), sizeof( filename ) );
COM_DefaultExtension( filename, sizeof( filename ), ".txt" );

Com_Printf ("Dumped console text to %s.\n", filename );

f = FS_FOpenFileWrite( filename );
if (!f)
{
Com_Printf ("ERROR: couldn't open %s.\n", filename);
return;
}

Com_Printf ("Dumped console text to %s.\n", filename );

// skip empty lines
for (l = con.current - con.totallines + 1 ; l <= con.current ; l++)
{
Expand Down

0 comments on commit 1d0a044

Please sign in to comment.