summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZdenek Prikryl <zprikryl@redhat.com>2009-08-20 16:10:01 +0200
committerZdenek Prikryl <zprikryl@redhat.com>2009-08-20 16:10:01 +0200
commite6b1174bd70e5f4442b6decfd5e72555a6c2661a (patch)
tree52b5c7b3a4e43a1bf8a89e68a86adcd78203f8ea /src
parent7e5da7f38f4bf950c4ff8e1688b872a229c2e0cb (diff)
downloadabrt-e6b1174bd70e5f4442b6decfd5e72555a6c2661a.tar.gz
abrt-e6b1174bd70e5f4442b6decfd5e72555a6c2661a.tar.xz
abrt-e6b1174bd70e5f4442b6decfd5e72555a6c2661a.zip
Comment cannot start in the middle of the line.
Comment has to start by Char # (first char in the line)
Diffstat (limited to 'src')
-rw-r--r--src/Daemon/PluginManager.cpp13
-rw-r--r--src/Daemon/Settings.cpp2
2 files changed, 5 insertions, 10 deletions
diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp
index 9bc8e6f..945d6b4 100644
--- a/src/Daemon/PluginManager.cpp
+++ b/src/Daemon/PluginManager.cpp
@@ -376,21 +376,16 @@ bool CPluginManager::LoadPluginSettings(const std::string& pPath, map_plugin_set
{
continue;
}
- if (line[ii] == '#' && !in_quote)
+ if (line[ii] == '#' && !in_quote && key == "")
{
break;
}
- else if (line[ii] == '=' && !in_quote)
+ if (line[ii] == '=' && !in_quote)
{
is_value = true;
+ continue;
}
- else if (line[ii] == '=' && is_value && !in_quote)
- {
- key = "";
- value = "";
- break;
- }
- else if (!is_value)
+ if (!is_value)
{
key += line[ii];
}
diff --git a/src/Daemon/Settings.cpp b/src/Daemon/Settings.cpp
index 2c52043..b12ceba 100644
--- a/src/Daemon/Settings.cpp
+++ b/src/Daemon/Settings.cpp
@@ -35,7 +35,7 @@ void CSettings::LoadSettings(const std::string& pPath)
{
continue;
}
- else if (line[ii] == '#' && !is_quote)
+ else if (line[ii] == '#' && !is_quote && key == "")
{
break;
}