summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/config.cpp b/src/config.cpp
index b3eca95ff..5cddfb268 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -664,6 +664,10 @@ void Conf::LoadConf(File &file)
{
Anope::string line = file.Read();
++linenumber;
+
+ /* If this line is completely empty and we are in a quote, just append a newline */
+ if (line.empty() && in_quote)
+ wordbuffer += "\n";
for (unsigned c = 0, len = line.length(); c < len; ++c)
{
@@ -673,7 +677,6 @@ void Conf::LoadConf(File &file)
/* Strip leading white spaces from multi line quotes */
if (c == 0)
{
- wordbuffer += "\n";
while (c < len && isspace(line[c]))
++c;
ch = line[c];
@@ -784,9 +787,9 @@ void Conf::LoadConf(File &file)
in_word = true;
}
- if (ch == ';' || ch == '}' || c + 1 == len)
+ if (ch == ';' || ch == '}' || c + 1 >= len)
{
- bool eol = c + 1 == len;
+ bool eol = c + 1 >= len;
if (!eol && in_quote)
// Allow ; and } in quoted strings