summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-04-14 13:54:40 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-04-14 13:55:33 +1000
commit1e3da5be51efebdd75df540a1c94baa6505cfc9a (patch)
tree2688b456c299d22920b0c536b1e1b7eec76b1b91
parentb04e8b472022c185123638a3d4639fbbcf0f144f (diff)
Fix 64 bit issues with set-int-prop.
libX11 expects longs for 32 bit numbers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/property.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/property.c b/src/property.c
index e591013..9c5e86b 100644
--- a/src/property.c
+++ b/src/property.c
@@ -69,7 +69,7 @@ print_property(Display *dpy, XDevice* dev, Atom property)
printf("%d", *((int16_t*)ptr));
break;
case 32:
- printf("%d", *((int32_t*)ptr));
+ printf("%ld", *((long*)ptr));
break;
}
break;
@@ -222,7 +222,7 @@ set_int_prop(Display *dpy, int argc, char** argv, char* n, char *desc)
*(((int16_t*)data) + i) = atoi(argv[3 + i]);
break;
case 32:
- *(((int32_t*)data) + i) = atoi(argv[3 + i]);
+ *(((long*)data) + i) = atoi(argv[3 + i]);
break;
}
}