[mutter] xprops: Fix STRING types as well



commit f041b35b9b739522b49eb980a6d2af5b3ef7cb60
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Jun 26 13:51:45 2015 -0700

    xprops: Fix STRING types as well

 src/x11/xprops.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/x11/xprops.c b/src/x11/xprops.c
index 5fb5150..589d538 100644
--- a/src/x11/xprops.c
+++ b/src/x11/xprops.c
@@ -339,8 +339,7 @@ latin1_string_from_results (GetPropertyResults *results,
   if (!validate_or_free_results (results, 8, XA_STRING, FALSE))
     return FALSE;
 
-  *str_p = (char*) results->prop;
-  results->prop = NULL;
+  *str_p = g_strndup ((char *) results->prop, results->n_items);
 
   return TRUE;
 }


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