diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2005-07-13 16:40:42 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2005-07-13 16:40:42 +0000 |
commit | 06bd0f9f0e94e86b5bbc113b2b7dbdeee7a4e052 (patch) | |
tree | 2c4989dd787a2092a1f4ccfc80c88e9da90e29a3 /src | |
parent | 4b1679900ab492406775091586ec006e344439d1 (diff) | |
download | weechat-06bd0f9f0e94e86b5bbc113b2b7dbdeee7a4e052.zip |
Special chars (between 01 and 31 decimal) not displayed any more on buffers (replaced by spaces)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/curses/gui-display.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c index ed553b682..ea9fc91f2 100644 --- a/src/gui/curses/gui-display.c +++ b/src/gui/curses/gui-display.c @@ -2498,6 +2498,7 @@ gui_add_message (t_gui_buffer *buffer, int type, int color, char *message) { char *pos; int length; + char *ptr_string; /* create new line if previous was ending by '\n' (or if 1st line) */ if (buffer->line_complete) @@ -2518,6 +2519,13 @@ gui_add_message (t_gui_buffer *buffer, int type, int color, char *message) buffer->line_complete = 1; } buffer->last_line->last_message->message = strdup (message); + ptr_string = buffer->last_line->last_message->message; + while (ptr_string[0]) + { + if ((ptr_string[0] > 0) && (ptr_string[0] < 32)) + ptr_string[0] = 32; + ptr_string++; + } length = strlen (message); buffer->last_line->length += length; if (type & MSG_TYPE_MSG) |