diff --git a/src/util/irchelpers.hpp b/src/util/irchelpers.hpp index 353707fe7..09845137d 100644 --- a/src/util/irchelpers.hpp +++ b/src/util/irchelpers.hpp @@ -15,19 +15,32 @@ QString ParseTagString(const QString &input) if (output[i] == '\\') { QChar c = output[i + 1]; - if (c == 'n') { - output[i] == '\n'; - } else if (c == 'r') { - output[i] == '\r'; - } else if (c == 's') { - output[i] == ' '; - } else if (c == '\\') { - output[i] == '\\'; - } else if (c == ':') { - output[i] == ';'; - } else { - output[i] = output[i + 1]; + switch (c.cell()) { + case 'n': { + output[i] = '\n'; + } break; + + case 'r': { + output[i] = '\r'; + } break; + + case 's': { + output[i] = ' '; + } break; + + case '\\': { + output[i] = '\\'; + } break; + + case ':': { + output[i] = ';'; + } break; + + default: { + output[i] = output[i + 1]; + } break; } + output[i + 1] = '\0'; changed = true; i++;