1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

Special chars (between 01 and 31 decimal) not displayed any more on buffers (replaced by spaces)

This commit is contained in:
Sebastien Helleu
2005-07-13 16:40:42 +00:00
parent 4b1679900a
commit 06bd0f9f0e
2 changed files with 16 additions and 0 deletions
+8
View File
@@ -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)
+8
View File
@@ -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)