[gnome-terminal] util: Sync make_utf8_valid from glib



commit 5e89fc17ea076314c1dd559da8c2c08f79a73c1d
Author: Christian Persch <chpe src gnome org>
Date:   Mon Oct 30 23:52:51 2017 +0100

    util: Sync make_utf8_valid from glib
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789444

 src/terminal-util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/terminal-util.c b/src/terminal-util.c
index 598d6c2..f6980c5 100644
--- a/src/terminal-util.c
+++ b/src/terminal-util.c
@@ -1304,7 +1304,7 @@ terminal_util_utf8_make_valid (const gchar *str,
   if (string == NULL)
     return g_strndup (str, len);
 
-  g_string_append (string, remainder);
+  g_string_append_len (string, remainder, remaining_bytes);
   g_string_append_c (string, '\0');
 
   g_assert (g_utf8_validate (string->str, -1, NULL));


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