diff options
Diffstat (limited to 'src/core/wee-input.c')
-rw-r--r-- | src/core/wee-input.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/wee-input.c b/src/core/wee-input.c index e90e31650..16feb7f77 100644 --- a/src/core/wee-input.c +++ b/src/core/wee-input.c @@ -1,7 +1,7 @@ /* * wee-input.c - default input callback for buffers * - * Copyright (C) 2003-2017 Sébastien Helleu <flashcode@flashtux.org> + * Copyright (C) 2003-2018 Sébastien Helleu <flashcode@flashtux.org> * * This file is part of WeeChat, the extensible chat client. * @@ -194,8 +194,7 @@ input_data (struct t_gui_buffer *buffer, const char *data) rc = WEECHAT_RC_OK; - if (!buffer || !gui_buffer_valid (buffer) - || !data || !data[0] || (data[0] == '\r') || (data[0] == '\n')) + if (!buffer || !gui_buffer_valid (buffer) || !data) { return WEECHAT_RC_ERROR; } @@ -213,12 +212,12 @@ input_data (struct t_gui_buffer *buffer, const char *data) data); /* data was dropped? */ - if (new_data && !new_data[0]) + if (data[0] && new_data && !new_data[0]) goto end; first_command = 1; ptr_data = (new_data) ? new_data : data; - while (ptr_data && ptr_data[0]) + while (ptr_data) { /* * if the buffer pointer is not valid any more (or if it's another |