diff --git a/src/misc/messages.cpp b/src/misc/messages.cpp index 4b5e5aff..073f2efb 100644 --- a/src/misc/messages.cpp +++ b/src/misc/messages.cpp @@ -69,7 +69,7 @@ void MSG_Replace(const char * _name, const char* _val) { static void LoadMessageFile(const char * fname) { if (!fname) return; if(*fname=='\0') return;//empty string=no languagefile - FILE * mfile=fopen(fname,"rb"); + FILE * mfile=fopen(fname,"rt"); /* This should never happen and since other modules depend on this use a normal printf */ if (!mfile) { E_Exit("MSG:Can't load messages: %s",fname); @@ -120,7 +120,7 @@ const char * MSG_Get(char const * msg) { void MSG_Write(const char * location) { - FILE* out=fopen(location,"w+b"); + FILE* out=fopen(location,"w+t"); if(out==NULL) return;//maybe an error? for(itmb tel=Lang.begin();tel!=Lang.end();tel++){ fprintf(out,":%s\n%s.\n",(*tel).name.c_str(),(*tel).val.c_str()); diff --git a/src/misc/setup.cpp b/src/misc/setup.cpp index fd69e7c8..76f64269 100644 --- a/src/misc/setup.cpp +++ b/src/misc/setup.cpp @@ -156,7 +156,7 @@ void Section_line::PrintData(FILE* outfile) { void Config::PrintConfig(const char* configfilename){ char temp[50]; - FILE* outfile=fopen(configfilename,"w+b"); + FILE* outfile=fopen(configfilename,"w+t"); if(outfile==NULL) return; for (it tel=sectionlist.begin(); tel!=sectionlist.end(); tel++){ /* Print out the Section header */