dont get a null at the end of the data, so use strndup
Dana Jansens danakj@orodu.net
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
openbox/prop.c
→
openbox/prop.c
@@ -303,7 +303,7 @@ char *raw;
guint num; if (get_all(win, prop, prop_atoms.utf8, 8, (guchar**)&raw, &num)) { - *ret = g_strdup(raw); /* grab the first string from the list */ + *ret = g_strndup(raw, num); /* grab the first string from the list */ g_free(raw); return TRUE; }