From 1d0a044de31736e0be4b46566d51d271bb2f518e Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Sun, 14 Apr 2013 18:33:25 +0200 Subject: [PATCH] when using the condump command, do not say "dumped console text" prematurely, before trying to open the file --- code/client/cl_console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/client/cl_console.c b/code/client/cl_console.c index 4c117ecd..d1b9fec1 100644 --- a/code/client/cl_console.c +++ b/code/client/cl_console.c @@ -191,8 +191,6 @@ 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) { @@ -200,6 +198,8 @@ void Con_Dump_f (void) return; } + Com_Printf ("Dumped console text to %s.\n", filename ); + // skip empty lines for (l = con.current - con.totallines + 1 ; l <= con.current ; l++) {