File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1079,8 +1079,11 @@ bool IOMapOTBM::loadSpawns(Map& map, const FileName& dir)
10791079 return false ;
10801080 }
10811081
1082+ // has to be declared again as encoding-specific characters break loading there
1083+ std::string encoded_path = (const char *)(dir.GetPath (wxPATH_GET_SEPARATOR | wxPATH_GET_VOLUME).mb_str (wxConvWhateverWorks));
1084+ encoded_path += map.spawnfile ;
10821085 pugi::xml_document doc;
1083- pugi::xml_parse_result result = doc.load_file (fn .c_str ());
1086+ pugi::xml_parse_result result = doc.load_file (encoded_path .c_str ());
10841087 if (!result) {
10851088 warnings.push_back (" IOMapOTBM::loadSpawns: File loading error." );
10861089 return false ;
@@ -1230,8 +1233,11 @@ bool IOMapOTBM::loadHouses(Map& map, const FileName& dir)
12301233 return false ;
12311234 }
12321235
1236+ // has to be declared again as encoding-specific characters break loading there
1237+ std::string encoded_path = (const char *)(dir.GetPath (wxPATH_GET_SEPARATOR | wxPATH_GET_VOLUME).mb_str (wxConvWhateverWorks));
1238+ encoded_path += map.housefile ;
12331239 pugi::xml_document doc;
1234- pugi::xml_parse_result result = doc.load_file (fn .c_str ());
1240+ pugi::xml_parse_result result = doc.load_file (encoded_path .c_str ());
12351241 if (!result) {
12361242 warnings.push_back (" IOMapOTBM::loadHouses: File loading error." );
12371243 return false ;
You can’t perform that action at this time.
0 commit comments