]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Formerly main.c.~69~
authorRoland McGrath <roland@redhat.com>
Fri, 15 Jan 1993 18:18:29 +0000 (18:18 +0000)
committerRoland McGrath <roland@redhat.com>
Fri, 15 Jan 1993 18:18:29 +0000 (18:18 +0000)
main.c

diff --git a/main.c b/main.c
index 60e4e76b13d88760936d7cc6cb79c923d6b501ba..e7bcd485a6d6aa1086e84ba6efff295f39afbabd 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1505,8 +1505,12 @@ define_makeflags (all, makefile)
          flags = flags->next;
        } while (flags != 0);
 
-      /* Kill the final space and dash.  */
-      p[-2] = '\0';
+      if (p[-1] == '-')
+       /* Kill the final space and dash.  */
+       p -= 2;
+
+      /* Terminate the string.  */
+      *p = '\0';
     }
 
   /* On Sun, the value of MFLAGS starts with a `-' but the