(init_switches): Put a + first in options.
authorRoland McGrath <roland@redhat.com>
Tue, 6 Sep 1994 23:13:43 +0000 (23:13 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 6 Sep 1994 23:13:43 +0000 (23:13 +0000)
main.c

diff --git a/main.c b/main.c
index 2a61826..71b176e 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1134,7 +1134,7 @@ main (argc, argv, envp)
 \f
 /* Parsing of arguments, decoding of switches.  */
 
-static char options[sizeof (switches) / sizeof (switches[0]) * 3];
+static char options[1 + sizeof (switches) / sizeof (switches[0]) * 3];
 static struct option long_options[(sizeof (switches) / sizeof (switches[0])) +
                                  (sizeof (long_option_aliases) /
                                   sizeof (long_option_aliases[0]))];
@@ -1152,6 +1152,7 @@ init_switches ()
     return;
 
   p = options;
+  *p++ = '+';                  /* Always permute.  */
   for (i = 0; switches[i].c != '\0'; ++i)
     {
       long_options[i].name = (switches[i].long_name == 0 ? "" :