Fix crash in config file loader

This commit is contained in:
bl0ckeduser 2011-11-17 14:00:30 -05:00
parent 2e275c4599
commit 2a939e6d9b
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;