summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
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';