1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

mwiniimporter: fix string cutting

This commit is contained in:
Emanuel Guevel 2012-12-29 17:15:53 +01:00
parent b2203d22fc
commit 9d043d0193

View File

@ -618,7 +618,7 @@ MwIniImporter::multistrmap MwIniImporter::loadIniFile(std::string filename) {
if(line[0] == '[') { if(line[0] == '[') {
if(line.length() > 2) { if(line.length() > 2) {
section = line.substr(1, line.length()-3); section = line.substr(1, line.length()-2);
} }
continue; continue;
} }
@ -711,7 +711,7 @@ void MwIniImporter::mergeFallback(multistrmap &cfg, multistrmap &ini) {
std::string value(*it); std::string value(*it);
std::replace( value.begin(), value.end(), ' ', '_' ); std::replace( value.begin(), value.end(), ' ', '_' );
std::replace( value.begin(), value.end(), ':', '_' ); std::replace( value.begin(), value.end(), ':', '_' );
value.append(",").append(vc->substr(0,vc->length()-1)); value.append(",").append(vc->substr(0,vc->length()));
insertMultistrmap(cfg, "fallback", value); insertMultistrmap(cfg, "fallback", value);
} }
} }