Merge pull request #14 from bl0ckeduser/patch-7

Fix crash in config file loader
This commit is contained in:
OV2 2011-11-18 13:46:30 -08:00
commit 342f773958
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ void ConfigFile::LoadFile(Reader *r, const char *name){
}
key=l.substr(0,i); ConfigEntry::trim(key);
val=l.substr(i+1); comment = ConfigEntry::trimCommented(val);
if(val[0]=='"' && *val.rbegin()=='"') val=val.substr(1, val.size()-2);
if(val.size() > 0 && val[0]=='"' && *val.rbegin()=='"') val=val.substr(1, val.size()-2);
ConfigEntry e(line, section, key, val);
e.comment = comment;