Bug fix
authorRobert Pengelly <robertapengelly@hotmail.com>
Sat, 18 Oct 2025 03:19:55 +0000 (04:19 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Sat, 18 Oct 2025 03:19:55 +0000 (04:19 +0100)
read.c

diff --git a/read.c b/read.c
index 73e72f2af7a045948d718d9d4a0f7be9b80b7452..dea0e0ddfbbf1904f261699d1f2dc9670cb8c297 100644 (file)
--- 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) {