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:
parent
b2203d22fc
commit
9d043d0193
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user