[ioquake3] 16/136: Fill in filename in Com_WriteConfig_f() before checking extension.
Simon McVittie
smcv at debian.org
Thu Jun 15 09:08:59 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository ioquake3.
commit de3339ebcda1999b386534bc581b8fa7272a846e
Author: SmileTheory <SmileTheory at gmail.com>
Date: Mon Mar 27 04:11:33 2017 -0700
Fill in filename in Com_WriteConfig_f() before checking extension.
Thanks BartoCH for pointing out.
---
code/qcommon/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/qcommon/common.c b/code/qcommon/common.c
index f3cf121..211a09c 100644
--- a/code/qcommon/common.c
+++ b/code/qcommon/common.c
@@ -2975,6 +2975,8 @@ void Com_WriteConfig_f( void ) {
return;
}
+ Q_strncpyz( filename, Cmd_Argv(1), sizeof( filename ) );
+ COM_DefaultExtension( filename, sizeof( filename ), ".cfg" );
if (!COM_CompareExtension(filename, ".cfg"))
{
@@ -2982,8 +2984,6 @@ void Com_WriteConfig_f( void ) {
return;
}
- Q_strncpyz( filename, Cmd_Argv(1), sizeof( filename ) );
- COM_DefaultExtension( filename, sizeof( filename ), ".cfg" );
Com_Printf( "Writing %s.\n", filename );
Com_WriteConfigToFile( filename );
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git
More information about the Pkg-games-commits
mailing list