[gtk/wip/otte/for-master] textbuffer: Don't serialize the \0 byte




commit 0fdb33e82ac8815a24b43190453801cbc2d9a40e
Author: Benjamin Otte <otte redhat com>
Date:   Wed Oct 7 22:14:18 2020 +0200

    textbuffer: Don't serialize the \0 byte
    
    ... when converting to text/plain.

 gtk/gtktextbuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c
index 2e846785e7..c7dd9d8c46 100644
--- a/gtk/gtktextbuffer.c
+++ b/gtk/gtktextbuffer.c
@@ -407,7 +407,7 @@ gtk_text_buffer_serialize_text_plain (GdkContentSerializer *serializer)
 
   g_output_stream_write_all_async (gdk_content_serializer_get_output_stream (serializer),
                                    str,
-                                   strlen (str) + 1,
+                                   strlen (str),
                                    gdk_content_serializer_get_priority (serializer),
                                    gdk_content_serializer_get_cancellable (serializer),
                                    gtk_text_buffer_serialize_text_plain_finish,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]