aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscatterflower <marisaposs@gameboyprinter.moe>2020-08-16 14:14:26 -0500
committerscatterflower <marisaposs@gameboyprinter.moe>2020-08-16 14:14:26 -0500
commit3c031db2ea3bfe56072b32ce240875b597014c16 (patch)
tree9b0a806163e45a99416cf117ef0b2baf8cf655a0
parent95725eb129f72231b0615a35cee2299c74c9a6a8 (diff)
fix check for negative char_id
-rw-r--r--src/courtroom.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 04a79605..943c2d4f 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 >= char_list.size())
+ if (f_char_id < 0 || f_char_id >= char_list.size())
return;
if (mute_map.value(m_chatmessage[CHAR_ID].toInt()))
return;