From 8bf2d4224e229441bb2bdecd79b254e1cf6f02d1 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Sat, 18 Oct 2025 04:19:55 +0100 Subject: [PATCH] Bug fix --- read.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/read.c b/read.c index 73e72f2..dea0e0d 100644 --- a/read.c +++ b/read.c @@ -759,21 +759,17 @@ static int read_lbuf (struct linebuf *lbuf, int set_default) { free (line); /* Make a fake all target. */ - line = xstrdup ("all"); + line = xstrdup ("all:"); - /* Get the filenames. */ - filenames = parse_nameseq (line, sizeof (*filenames)); - - /* Get the depstr. */ - depstr = xstrdup (line + 3); + /* Re-get the colon. */ + *(colon = strchr (line, ':')) = '\0'; } else { - - filenames = parse_nameseq (line, sizeof (*filenames)); - depstr = xstrdup (colon + 1); - } + filenames = parse_nameseq (line, sizeof (*filenames)); + depstr = xstrdup (colon + 1); + free (line); if (semicolonp) { -- 2.34.1