diff options
Diffstat (limited to 'src/plugins/guile/weechat-guile.c')
-rw-r--r-- | src/plugins/guile/weechat-guile.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c index 4b6406e48..e1a6484c7 100644 --- a/src/plugins/guile/weechat-guile.c +++ b/src/plugins/guile/weechat-guile.c @@ -1180,13 +1180,13 @@ weechat_guile_port_write (SCM port, SCM src, size_t start, size_t count) ptr_data = data2; while ((ptr_newline = strchr (ptr_data, '\n')) != NULL) { - ptr_newline[0] = '\0'; - weechat_string_dyn_concat (guile_buffer_output, ptr_data); + weechat_string_dyn_concat (guile_buffer_output, + ptr_data, + ptr_newline - ptr_data); weechat_guile_output_flush (); - ptr_newline[0] = '\n'; ptr_data = ++ptr_newline; } - weechat_string_dyn_concat (guile_buffer_output, ptr_data); + weechat_string_dyn_concat (guile_buffer_output, ptr_data, -1); free (data2); @@ -1212,13 +1212,13 @@ weechat_guile_port_write (SCM port, const void *data, size_t size) ptr_data = data2; while ((ptr_newline = strchr (ptr_data, '\n')) != NULL) { - ptr_newline[0] = '\0'; - weechat_string_dyn_concat (guile_buffer_output, ptr_data); + weechat_string_dyn_concat (guile_buffer_output, + ptr_data, + ptr_newline - ptr_data); weechat_guile_output_flush (); - ptr_newline[0] = '\n'; ptr_data = ++ptr_newline; } - weechat_string_dyn_concat (guile_buffer_output, ptr_data); + weechat_string_dyn_concat (guile_buffer_output, ptr_data, -1); free (data2); } |