From 4b7efc8536f4ea518eb43483e3805255f36ada75 Mon Sep 17 00:00:00 2001 From: scatterflower Date: Sun, 16 Aug 2020 14:17:58 -0500 Subject: [PATCH] allow -1 charid for system messages --- src/courtroom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 943c2d4..fa55ba8 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1815,7 +1815,7 @@ void Courtroom::handle_chatmessage(QStringList *p_contents) int f_char_id = m_chatmessage[CHAR_ID].toInt(); const bool is_spectator = (f_char_id == -1); - if (f_char_id < 0 || f_char_id >= char_list.size()) + if (f_char_id < -1 || f_char_id >= char_list.size()) return; if (mute_map.value(m_chatmessage[CHAR_ID].toInt())) return;