From: Alexandru DAMIAN <[email protected]>

Weston options in long name format may have the
values separated from option name by the '=' character,
or specified as a separate argument, e.g.
"--config value".

If the option value is a separate argument, we need
to mark that argument as parsed and not try to
reiterate over it.

Signed-off-by: Alexandru DAMIAN <[email protected]>
---
 shared/option-parser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/shared/option-parser.c b/shared/option-parser.c
index c00349a..c8a84db 100644
--- a/shared/option-parser.c
+++ b/shared/option-parser.c
@@ -67,6 +67,7 @@ parse_options(const struct weston_option *options,
                            strncmp(options[k].name, &argv[i][2], len) == 0 &&
                            (argv[i][len + 2] == '=' || argv[i][len + 2] == 
'\0')) {
                                handle_option(&options[k], &argv[i][len + 3]);
+                               if (argv[i][len+2] == '\0') i++;
                                break;
                        } else if (options[k].short_name &&
                                   argv[i][0] == '-' &&
-- 
1.8.1.2

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to