tools: fix option parsing in libinput measure
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 26 Feb 2018 03:50:17 +0000 (13:50 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 26 Feb 2018 03:53:40 +0000 (13:53 +1000)
Missing '+' in the optstring caused it to evaluate all options. If any
argument was passed to a subcommand, libinput-measure would throw an error and
exit.

https://bugs.freedesktop.org/show_bug.cgi?id=105246

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools/libinput-measure.c

index 9b489ed2b25480e3dca3f56ef03b5389f1a2ba9f..fb9729c7684e5a964f5a2f1c399392578077feb2 100644 (file)
@@ -53,7 +53,7 @@ main(int argc, char **argv)
                        { 0, 0, 0, 0}
                };
 
-               c = getopt_long(argc, argv, "h", opts, &option_index);
+               c = getopt_long(argc, argv, "+h", opts, &option_index);
                if (c == -1)
                        break;