Print error message when we can't parse a .ini assignment line.
--HG-- extra : convert_revision : b7e19ff42ddd9a21571e086c11e143d9290e0e38
This commit is contained in:
parent
35a0764307
commit
21c7ee1e3e
1 changed files with 4 additions and 1 deletions
|
@ -217,8 +217,11 @@ bool
|
||||||
IniFile::Section::add(const std::string &assignment)
|
IniFile::Section::add(const std::string &assignment)
|
||||||
{
|
{
|
||||||
string::size_type offset = assignment.find('=');
|
string::size_type offset = assignment.find('=');
|
||||||
if (offset == string::npos) // no '=' found
|
if (offset == string::npos) {
|
||||||
|
// no '=' found
|
||||||
|
cerr << "Can't parse .ini line " << assignment << endl;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// if "+=" rather than just "=" then append value
|
// if "+=" rather than just "=" then append value
|
||||||
bool append = (assignment[offset-1] == '+');
|
bool append = (assignment[offset-1] == '+');
|
||||||
|
|
Loading…
Reference in a new issue