summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1996-07-26 00:33:25 +0000
committerRoland McGrath <roland@redhat.com>1996-07-26 00:33:25 +0000
commit08905cdcbcdf3bef972d4567ac5c84ceae0bb1de (patch)
tree230e6d7c4214283068cf6f9831d3de3ff2291725 /main.c
parent4b72e38789a34aa0f8f25ab26b0523e475710718 (diff)
downloadgunmake-08905cdcbcdf3bef972d4567ac5c84ceae0bb1de.tar.gz
Thu Jul 25 19:53:31 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* main.c (define_makeflags): Back up P to point at null terminator when killing final space and dash before setting MFLAGS.
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.c b/main.c
index 97b160d..b6e3c95 100644
--- a/main.c
+++ b/main.c
@@ -2040,8 +2040,11 @@ define_makeflags (all, makefile)
/* No flags. */
flagstring[0] = '\0';
else if (p[-1] == '-')
- /* Kill the final space and dash. */
- p[-2] = '\0';
+ {
+ /* Kill the final space and dash. */
+ p -= 2;
+ *p = '\0';
+ }
else
/* Terminate the string. */
*p = '\0';