aboutsummaryrefslogtreecommitdiff
path: root/courtroom.cpp
diff options
context:
space:
mode:
authorCerapter <cerap@protonmail.com>2018-12-12 18:55:16 +0100
committerCerapter <cerap@protonmail.com>2018-12-12 18:55:16 +0100
commit941a32d99caf4406d86b9fc85440c875d4ca5207 (patch)
treefa8c5d879e3da4c231a7093b903535456c99152c /courtroom.cpp
parent1dcdb0f5d8fd350f7863842035e4c8842cd035ce (diff)
Fixed a bug where your chatlog would completely erase if you had a limit of 0.
A limit of zero otherwise means infinite, so no log limit.
Diffstat (limited to 'courtroom.cpp')
-rw-r--r--courtroom.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/courtroom.cpp b/courtroom.cpp
index 66e29caf..3da69ad8 100644
--- a/courtroom.cpp
+++ b/courtroom.cpp
@@ -1309,7 +1309,7 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
chatlogpiece* temp = new chatlogpiece(ao_app->get_showname(char_list.at(f_char_id).name), f_showname, ": " + m_chatmessage[MESSAGE], false);
ic_chatlog_history.append(*temp);
- while(ic_chatlog_history.size() > log_maximum_blocks)
+ while(ic_chatlog_history.size() > log_maximum_blocks && log_maximum_blocks > 0)
{
ic_chatlog_history.removeFirst();
}
@@ -2611,7 +2611,7 @@ void Courtroom::handle_song(QStringList *p_contents)
chatlogpiece* temp = new chatlogpiece(str_char, str_show, f_song, true);
ic_chatlog_history.append(*temp);
- while(ic_chatlog_history.size() > log_maximum_blocks)
+ while(ic_chatlog_history.size() > log_maximum_blocks && log_maximum_blocks > 0)
{
ic_chatlog_history.removeFirst();
}