mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
xprops: Cut off UTF-8 strings at n_items characters
There can be junk after here on some X servers.
This commit is contained in:
parent
5d360a9bce
commit
734402e14d
@ -438,8 +438,7 @@ utf8_string_from_results (GetPropertyResults *results,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
*str_p = (char*) results->prop;
|
*str_p = g_strndup ((char *) results->prop, results->n_items);
|
||||||
results->prop = NULL;
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user