diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-04-14 22:42:10 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-04-14 22:42:10 +0000 |
| commit | 693c88ca35a19b50ee52860800bcb861c035f7da (patch) | |
| tree | 6b91c618f8b228e3755d03e13bf7d0dea51e37fb /openbox | |
| parent | cb6840788b26fa1560f6dca93bd9af42d00c9b70 (diff) | |
dont get a null at the end of the data, so use strndup
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/prop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openbox/prop.c b/openbox/prop.c index 27941ac3..a97b66dc 100644 --- a/openbox/prop.c +++ b/openbox/prop.c @@ -303,7 +303,7 @@ gboolean prop_get_string_utf8(Window win, Atom prop, char **ret) 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; } |
