summaryrefslogtreecommitdiff
path: root/src/plugins/python/weechat-python.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/python/weechat-python.c')
-rw-r--r--src/plugins/python/weechat-python.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c
index 2515f6f08..d9731784d 100644
--- a/src/plugins/python/weechat-python.c
+++ b/src/plugins/python/weechat-python.c
@@ -444,13 +444,13 @@ weechat_python_output (PyObject *self, PyObject *args)
ptr_msg = msg;
while ((ptr_newline = strchr (ptr_msg, '\n')) != NULL)
{
- ptr_newline[0] = '\0';
- weechat_string_dyn_concat (python_buffer_output, ptr_msg);
+ weechat_string_dyn_concat (python_buffer_output,
+ ptr_msg,
+ ptr_newline - ptr_msg);
weechat_python_output_flush ();
- ptr_newline[0] = '\n';
ptr_msg = ++ptr_newline;
}
- weechat_string_dyn_concat (python_buffer_output, ptr_msg);
+ weechat_string_dyn_concat (python_buffer_output, ptr_msg, -1);
}
Py_INCREF(Py_None);