diff options
-rw-r--r-- | src/fe-common/core/chat-completion.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fe-common/core/chat-completion.c b/src/fe-common/core/chat-completion.c index 803700de..988c311f 100644 --- a/src/fe-common/core/chat-completion.c +++ b/src/fe-common/core/chat-completion.c @@ -81,6 +81,9 @@ static void last_msg_add(GSList **list, const char *nick, int own, int max) { LAST_MSG_REC *rec; + if (max <= 0) + return; + rec = last_msg_find(*list, nick); if (rec != NULL) { /* msg already exists, update it */ |