From 53b0bb04aaa996992220145b4a90a8318a399233 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 29 Jun 2013 16:32:24 -0700 Subject: Bug 66388 wrong output for filter names in RandR GetCrtcTransform reply https://bugs.freedesktop.org/show_bug.cgi?id=66388 Had missed a 4 byte padding field between the transform data and the start of the filter name fields. The offset to the strings now matches the 96 bytes specified for sz_xRRGetCrtcTransformReply in and the test case now reports: pending filter name: "bilinear" instead of: current filter name: "^@^@^@^@bili" Signed-off-by: Alan Coopersmith --- print_randr.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'print_randr.c') diff --git a/print_randr.c b/print_randr.c index 3182664..5eb3e63 100644 --- a/print_randr.c +++ b/print_randr.c @@ -1116,18 +1116,19 @@ RandrGetCrtcTransformReply(FD fd, const unsigned char *buf) PrintField(buf, 44, 1, BOOL, "has transforms"); /* 3 bytes unused */ PrintField(buf, 48, 36, RENDERTRANSFORM, "current transform"); + /* 4 bytes unused */ - printfield(buf, 84, 2, CARD16, "pending filter name length"); /* pn */ - printfield(buf, 86, 2, CARD16, "pending filter num params"); /* pf */ - printfield(buf, 88, 2, CARD16, "current filter name length"); /* cn */ - printfield(buf, 90, 2, CARD16, "current filter num params"); /* cf */ + printfield(buf, 88, 2, CARD16, "pending filter name length"); /* pn */ + printfield(buf, 90, 2, CARD16, "pending filter num params"); /* pf */ + printfield(buf, 92, 2, CARD16, "current filter name length"); /* cn */ + printfield(buf, 94, 2, CARD16, "current filter num params"); /* cf */ - pn = IShort(&buf[84]); - pf = IShort(&buf[86]); - cn = IShort(&buf[88]); - cf = IShort(&buf[90]); + pn = IShort(&buf[88]); + pf = IShort(&buf[90]); + cn = IShort(&buf[92]); + cf = IShort(&buf[94]); - buf += 92; + buf += 96; PrintString8(buf, pn, "pending filter name"); buf += pad(pn); -- cgit v1.2.1