X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fprop.c;h=c53f250321a627a4021bd3c4af185a05d00c27e9;hb=135d6d7bdc5add79aabcdfca2cbfb290d5591341;hp=e708b9843df4709d8c326526361dfd6fa847bea7;hpb=bcbe5c8f823cc12bd64feb2cf87d981e4f8c99fa;p=chaz%2Fopenbox diff --git a/openbox/prop.c b/openbox/prop.c index e708b984..c53f2503 100644 --- a/openbox/prop.c +++ b/openbox/prop.c @@ -186,7 +186,7 @@ static gboolean get_prealloc(Window win, Atom prop, Atom type, int size, ((guint16*)data)[i] = ((guint16*)xdata)[i]; break; case 32: - ((guint32*)data)[i] = ((guint32*)xdata)[i]; + ((guint32*)data)[i] = ((gulong*)xdata)[i]; break; default: g_assert_not_reached(); /* unhandled size */ @@ -225,7 +225,7 @@ static gboolean get_all(Window win, Atom prop, Atom type, int size, ((guint16*)*data)[i] = ((guint16*)xdata)[i]; break; case 32: - ((guint32*)*data)[i] = ((guint32*)xdata)[i]; + ((guint32*)*data)[i] = ((gulong*)xdata)[i]; break; default: g_assert_not_reached(); /* unhandled size */ @@ -294,7 +294,7 @@ gboolean prop_get_strings_locale(Window win, Atom prop, char ***ret) g_strfreev(*ret); /* free what we did so far */ break; /* the force is not strong with us */ } - p = strchr(p, '\0'); + p += strlen(p) + 1; } g_free(raw); if (i == num) @@ -328,7 +328,7 @@ gboolean prop_get_strings_utf8(Window win, Atom prop, char ***ret) p = raw; for (i = 0; i < num; ++i) { (*ret)[i] = g_strdup(p); - p = strchr(p, '\0'); + p += strlen(p) + 1; } g_free(raw); return TRUE;