diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-05-06 20:10:52 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-05-06 20:10:52 +0000 |
commit | 6e60dd8489444f28a821baf8a8143b1c79aafc75 (patch) | |
tree | 26e94b81587745aa475c2d36bbd2c4b4f0480d1e /glib/goption.c | |
parent | 2ae1a46b4c8d9849f43eb9f059a98eadb4f2a6c9 (diff) | |
download | glib-6e60dd8489444f28a821baf8a8143b1c79aafc75.tar.gz |
Add a testcase.
2005-05-06 Matthias Clasen <mclasen@redhat.com>
* tests/option-test.c: Add a testcase.
* glib/goption.c (g_option_context_parse): Treat '-'
on its own as a non-option argument. (#168008, Tim Musson,
Thomas Leonard and others)
Diffstat (limited to 'glib/goption.c')
-rw-r--r-- | glib/goption.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/glib/goption.c b/glib/goption.c index a8528de36..234c1c938 100644 --- a/glib/goption.c +++ b/glib/goption.c @@ -1168,7 +1168,7 @@ g_option_context_parse (GOptionContext *context, gchar *arg, *dash; gboolean parsed = FALSE; - if ((*argv)[i][0] == '-' && !stop_parsing) + if ((*argv)[i][0] == '-' && (*argv)[i][1] != '\0' && !stop_parsing) { if ((*argv)[i][1] == '-') { |