diff options
Diffstat (limited to 'src/helperfuncs.cpp')
| -rw-r--r-- | src/helperfuncs.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 8ee71a4df..a8fc3e541 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -194,20 +194,12 @@ void InspIRCd::ProcessColors(std::string& line) auto start = idx; if (++idx >= line.length()) - { - // Stray \ at the end of the string; strip. - line.pop_back(); - continue; - } + continue; // Stray \ at the end of the string; skip. const auto chr = line[idx]; const auto it = formats.find(chr); if (it == formats.end()) - { - // Unknown escape, strip. - line.erase(start, 2); - continue; - } + continue; // Unknown escape, skip. line.replace(start, 2, it->second); idx = start + it->second.length(); |
