+2004-10-05 Anders Carlsson <andersca@gnome.org>
+
+ * glib/goption.c: (g_option_context_parse):
+ Add check for if argc is 0.
+
+ * tests/option-test.c: (empty_test3), (main):
+ Add test case.
+
2004-10-05 Matthias Clasen <mclasen@redhat.com>
* NEWS: Update
+2004-10-05 Anders Carlsson <andersca@gnome.org>
+
+ * glib/goption.c: (g_option_context_parse):
+ Add check for if argc is 0.
+
+ * tests/option-test.c: (empty_test3), (main):
+ Add test case.
+
2004-10-05 Matthias Clasen <mclasen@redhat.com>
* NEWS: Update
+2004-10-05 Anders Carlsson <andersca@gnome.org>
+
+ * glib/goption.c: (g_option_context_parse):
+ Add check for if argc is 0.
+
+ * tests/option-test.c: (empty_test3), (main):
+ Add test case.
+
2004-10-05 Matthias Clasen <mclasen@redhat.com>
* NEWS: Update
+2004-10-05 Anders Carlsson <andersca@gnome.org>
+
+ * glib/goption.c: (g_option_context_parse):
+ Add check for if argc is 0.
+
+ * tests/option-test.c: (empty_test3), (main):
+ Add test case.
+
2004-10-05 Matthias Clasen <mclasen@redhat.com>
* NEWS: Update
+2004-10-05 Anders Carlsson <andersca@gnome.org>
+
+ * glib/goption.c: (g_option_context_parse):
+ Add check for if argc is 0.
+
+ * tests/option-test.c: (empty_test3), (main):
+ Add test case.
+
2004-10-05 Matthias Clasen <mclasen@redhat.com>
* NEWS: Update
GList *list;
/* Set program name */
- if (argc && argv)
+ if (argc && argv && *argc)
{
gchar *prgname;
g_option_context_free (context);
}
+void
+empty_test3 (void)
+{
+ GOptionContext *context;
+ gint argc;
+ gchar **argv;
+
+ argc = 0;
+ argv = NULL;
+
+ context = g_option_context_new (NULL);
+ g_option_context_parse (context, &argc, &argv, NULL);
+
+ g_option_context_free (context);
+}
+
int
main (int argc, char **argv)
{
/* Test parsing empty args */
empty_test1 ();
empty_test2 ();
-
+ empty_test3 ();
+
return 0;
}