aboutsummaryrefslogtreecommitdiff
path: root/src/configparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/configparser.cpp')
-rw-r--r--src/configparser.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp
index 2622b7016..e6b312473 100644
--- a/src/configparser.cpp
+++ b/src/configparser.cpp
@@ -495,9 +495,12 @@ bool ConfigTag::readString(const std::string& key, std::string& value, bool allo
{
ServerInstance->Logs.Log("CONFIG", LOG_DEFAULT, "Value of <" + name + ":" + key + "> at " + source.str() +
" contains a linefeed, and linefeeds in this value are not permitted -- stripped to spaces.");
- for (std::string::iterator n = value.begin(); n != value.end(); n++)
- if (*n == '\n')
- *n = ' ';
+
+ for (auto& chr : value)
+ {
+ if (chr == '\n')
+ chr = ' ';
+ }
}
return true;
}