From f041b35b9b739522b49eb980a6d2af5b3ef7cb60 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 26 Jun 2015 13:51:45 -0700 Subject: [PATCH] xprops: Fix STRING types as well --- src/x11/xprops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/x11/xprops.c b/src/x11/xprops.c index 5fb51509e..589d53810 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; }