From 4ff02903a65dc9dcc8bd97613e46a6736cda46a1 Mon Sep 17 00:00:00 2001 From: Peter Harris Date: Fri, 16 Oct 2015 20:57:34 -0400 Subject: [PATCH] x11 generator: Don't crash when a switch is in a struct The size calculation for the struct will be wrong (too small) which looks strange in the GUI when the children elements extend past the region marked by their parent. But it doesn't seem to cause any actual problems, there is only one request affected by this, and correct size calculation (by recursing the switch) would take a fair amount of work. Change-Id: I1847f736153daf59b8dbf3299005a772ffe9673a Reviewed-on: https://code.wireshark.org/review/11107 Reviewed-by: Jeff Morriss --- tools/process-x11-xcb.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/process-x11-xcb.pl b/tools/process-x11-xcb.pl index 07c8e4bd2b..fede9353ac 100755 --- a/tools/process-x11-xcb.pl +++ b/tools/process-x11-xcb.pl @@ -998,7 +998,10 @@ sub struct { } } when ('field') { } - when ('switch') { } # New field in xcbproto/src/xinput.xml + when ('switch') { + $dynamic = 1; + next; + } default { die("unrecognized field: $_\n"); } }