Update interface.c to avoid error messages
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.
This commit is contained in:
parent
a40a9f574a
commit
5baaabdd8a
1 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue