From 3c63e44d32edcced83c88fc7d06e33d40791b781 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 7 Sep 2012 05:59:28 -0400 Subject: [PATCH] Allow ; and } in quoted strings --- src/config.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index 0ec4fb34e..a5e07596d 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -1694,9 +1694,7 @@ void ServerConfig::LoadConf(ConfigurationFile &file) // Terminate word in_word = false; } - else if (!in_word && ch == ';') - ; - else if (ch == '}') + else if (ch == ';' || ch == '}') ; else { @@ -1711,6 +1709,12 @@ void ServerConfig::LoadConf(ConfigurationFile &file) if (ch == ';' || ch == '}' || c + 1 == len) { + bool eol = c + 1 == len; + + if (!eol && in_quote) + // Allow ; and } in quoted strings + continue; + if (in_quote) { // Quotes can span multiple lines; all we need to do is go to the next line without clearing things