From d19c4c129480a46d748a71d0535f32dba37730c0 Mon Sep 17 00:00:00 2001 From: Falk Date: Thu, 13 Feb 2014 00:52:25 +0100 Subject: [PATCH] Update interface.c to avoid error messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When hitting enter (without writing anything) in an chat prompt always appears an error message telling you that the message is empty. Checking the content of the line can avoid this. I don't know is this behaviour is wrong or right. So please forgive me if it doesn’t make sense. --- interface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/interface.c b/interface.c index c6ffc67..59af7b2 100644 --- a/interface.c +++ b/interface.c @@ -576,7 +576,9 @@ void interpreter_chat_mode (char *line) { do_mark_read (chat_mode_id); return; } - do_send_message (chat_mode_id, line, strlen (line)); + if (strlen (line)>0) { + do_send_message (chat_mode_id, line, strlen (line)); + } } void interpreter (char *line UU) {