CmdConfig: Added check for empty file

This commit is contained in:
Paul Beckingham 2016-05-05 20:54:02 -04:00
parent d879833ebe
commit f0cc48f4f1

View file

@ -116,7 +116,8 @@ static bool setConfigVariable (const Rules& rules, std::string name, std::string
// new leaf/value properly. But that's non-trivial.
// Add blank line required by rules.
if (lines.back () != "")
if (lines.size () &&
lines.back () != "")
lines.push_back ("");
// Add new line.