summaryrefslogtreecommitdiff
path: root/src/cl_main.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2011-12-18 22:28:37 +0400
committerAndrey Nazarov <skuller@skuller.net>2011-12-18 22:28:37 +0400
commitd17e7ddd2cd757fa6c98826ec1873a51d0b593ee (patch)
tree87aed0e83dd4dac84f6a46251fd4f99bac6b7e23 /src/cl_main.c
parenta993642da53026ff05dd74a1ade7cb09f7f25c31 (diff)
Fix line endings when writing text files on Win32.
Diffstat (limited to 'src/cl_main.c')
-rw-r--r--src/cl_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cl_main.c b/src/cl_main.c
index 726d177..b8dcaf1 100644
--- a/src/cl_main.c
+++ b/src/cl_main.c
@@ -2024,7 +2024,7 @@ static void dump_program( const char *text, const char *name ) {
return;
}
- if( FS_EasyWriteFile( buffer, sizeof( buffer ), FS_MODE_WRITE,
+ if( FS_EasyWriteFile( buffer, sizeof( buffer ), FS_MODE_WRITE | FS_FLAG_TEXT,
"layouts/", Cmd_Argv( 1 ), ".txt", text, strlen( text ) ) )
{
Com_Printf( "Dumped %s program to %s.\n", name, buffer );
@@ -2099,7 +2099,7 @@ static void CL_WriteConfig_f( void ) {
mask = CVAR_ARCHIVE;
}
- f = FS_EasyOpenFile( buffer, sizeof( buffer ), FS_MODE_WRITE,
+ f = FS_EasyOpenFile( buffer, sizeof( buffer ), FS_MODE_WRITE | FS_FLAG_TEXT,
"configs/", cmd_optarg, ".cfg" );
if( !f ) {
return;
@@ -3241,7 +3241,7 @@ static void CL_WriteConfig( void ) {
qhandle_t f;
qerror_t ret;
- ret = FS_FOpenFile( COM_CONFIG_NAME, &f, FS_MODE_WRITE );
+ ret = FS_FOpenFile( COM_CONFIG_NAME, &f, FS_MODE_WRITE | FS_FLAG_TEXT );
if( !f ) {
Com_EPrintf( "Couldn't open %s for writing: %s\n",
COM_CONFIG_NAME, Q_ErrorString( ret ) );