mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-30 12:54:11 +02:00
goption: Reject group options specified with three dashes
Commandline option parsing would recognize group options specified with three dashes (i.e. ---foo 42). This behaviour was limited to group options.
This commit is contained in:
@@ -2028,7 +2028,7 @@ g_option_context_parse (GOptionContext *context,
|
||||
|
||||
/* Now look for --<group>-<option> */
|
||||
dash = strchr (arg, '-');
|
||||
if (dash)
|
||||
if (dash && arg < dash)
|
||||
{
|
||||
/* Try the groups */
|
||||
list = context->groups;
|
||||
|
Reference in New Issue
Block a user