fixed bug #629841
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@480
This commit is contained in:
parent
8dc5a523de
commit
c341f40597
2 changed files with 3 additions and 3 deletions
|
@ -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());
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue