fix segfault in console code
This commit is contained in:
parent
8f0a810539
commit
7b6e8fc473
|
@ -282,10 +282,11 @@ void DiscordPage::javaScriptConsoleMessage(
|
|||
ansi += "\033[" + cssAnsiColorMap[color] + "m";
|
||||
}
|
||||
}
|
||||
qDebug(discordLog) << (ansi + lines[0].trimmed() + "\033[0m " +
|
||||
lines[endOfStyles].trimmed())
|
||||
.toUtf8()
|
||||
.constData();
|
||||
if (endOfStyles < lines.length())
|
||||
qDebug(discordLog) << (ansi + lines[0].trimmed() + "\033[0m " +
|
||||
lines[endOfStyles].trimmed())
|
||||
.toUtf8()
|
||||
.constData();
|
||||
for (auto line : lines.mid(endOfStyles + 1)) {
|
||||
qDebug(discordLog) << line.toUtf8().constData();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue