From 69fd0296a4ecf3d50b3b03907b922300bdca4489 Mon Sep 17 00:00:00 2001 From: Giles Atkinson <“gatk555@gmail.com”> Date: Wed, 17 Apr 2024 18:51:12 +0100 Subject: [PATCH] Prevent lines beginning '#' in .include files from being treated as device lines. --- src/frontend/inpcom.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 06cabc0e0..80a551437 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -3241,7 +3241,12 @@ static void inp_stripcomments_line(char *s, bool cs) return; /* empty line */ if (*s == '*') return; /* line is already a comment */ - /* look for comments */ + if (*s == '#') { + *s = '*'; // Convert to widely-recognised form. + return; + } + + /* Look for comments in body of line. */ while ((c = *d) != '\0') { d++;