summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1994-11-06 23:33:55 +0000
committerRoland McGrath <roland@redhat.com>1994-11-06 23:33:55 +0000
commit1a886b635915445f5b1cc6a9c475cfbb2e7edb83 (patch)
tree6de3f656ec4f461f56b0fba97e556e58509c7321 /main.c
parentb511712f254e241b7008dd3d74543de8183432b5 (diff)
downloadgunmake-1a886b635915445f5b1cc6a9c475cfbb2e7edb83.tar.gz
(define_makeflags): Terminate properly when FLAGSTRING is empty.
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.c b/main.c
index 9c17a34..61b98a6 100644
--- a/main.c
+++ b/main.c
@@ -1781,6 +1781,8 @@ define_makeflags (all, makefile)
p += sizeof ref - 1;
}
}
+ else if (p == &flagstring[1])
+ --p;
else if (p[-1] == '-')
/* Kill the final space and dash. */
p -= 2;