mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 20:53:50 +00:00
fix importer crash on empty lines (thanks to Ace)
This commit is contained in:
parent
b4950509bc
commit
18b3cfebdb
1 changed files with 4 additions and 4 deletions
|
@ -674,6 +674,10 @@ MwIniImporter::multistrmap MwIniImporter::loadIniFile(const std::string& filenam
|
||||||
line = line.substr(0, line.length()-1);
|
line = line.substr(0, line.length()-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(line.empty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(line[0] == '[') {
|
if(line[0] == '[') {
|
||||||
int pos = line.find(']');
|
int pos = line.find(']');
|
||||||
if(pos < 2) {
|
if(pos < 2) {
|
||||||
|
@ -690,10 +694,6 @@ MwIniImporter::multistrmap MwIniImporter::loadIniFile(const std::string& filenam
|
||||||
line = line.substr(0,comment_pos);
|
line = line.substr(0,comment_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(line.empty()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
int pos = line.find("=");
|
int pos = line.find("=");
|
||||||
if(pos < 1) {
|
if(pos < 1) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue