From: Peter Hutterer Date: Thu, 30 Apr 2009 04:50:08 +0000 (+1000) Subject: If there's multiple null-terminated strings in the property, print all. X-Git-Url: https://diplodocus.org/git/xorg-xinput/commitdiff_plain/42dca922d287ffddcf2185ca96738f1505a04c27?ds=sidebyside;hp=--cc If there's multiple null-terminated strings in the property, print all. Signed-off-by: Peter Hutterer Signed-off-by: Simon Thum --- 42dca922d287ffddcf2185ca96738f1505a04c27 diff --git a/src/property.c b/src/property.c index e84a570..a21edc6 100644 --- a/src/property.c +++ b/src/property.c @@ -98,8 +98,17 @@ print_property(Display *dpy, XDevice* dev, Atom property) } break; case XA_STRING: + if (act_format != 8) + { + printf("Unknown string format.\n"); + done = True; + break; + } printf("\"%s\"", ptr); - done = True; + j += strlen((char*)ptr); /* The loop's j++ jumps over the + terminating 0 */ + ptr += strlen((char*)ptr); /* ptr += size below jumps over + the terminating 0 */ break; case XA_ATOM: printf("\"%s\"", XGetAtomName(dpy, *(Atom*)ptr));