From 4a0df25c39b429291c77d571dc9e667831b43a89 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Mon, 27 Jul 2020 20:09:09 +0300 Subject: [PATCH] Fix chatlog instances where char_id 0 is ignored (#210) --- src/courtroom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 2d22b5a..109c347 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1719,7 +1719,7 @@ void Courtroom::handle_chatmessage(QStringList *p_contents) return; QString f_showname; - if (f_char_id > 0 && + if (f_char_id > -1 && (m_chatmessage[SHOWNAME].isEmpty() || !ui_showname_enable->isChecked())) { f_showname = ao_app->get_showname(char_list.at(f_char_id).name); } @@ -2161,7 +2161,7 @@ void Courtroom::handle_chatmessage_3() QString f_showname; int f_char_id = m_chatmessage[CHAR_ID].toInt(); - if (f_char_id > 0 && + if (f_char_id > -1 && (m_chatmessage[SHOWNAME].isEmpty() || !ui_showname_enable->isChecked())) { f_showname = ao_app->get_showname(char_list.at(f_char_id).name); }