From c9f6fcc8d2c0ec3ef38d6592bdfde1c4fe41fa27 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Mon, 14 Apr 2025 17:20:36 +0200 Subject: [PATCH] macro: Fixed side-effect that was caused by the previous fix The check should also ensure that the char following the new line is not 0. --- src/ulas.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ulas.c b/src/ulas.c index 3e7d92e..40e6aca 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -881,7 +881,8 @@ char *ulas_preprocexpand(struct ulas_preproc *pp, const char *raw_line, // remove comment seen if raw line // starts a new line // this fixes expnasion in macros containing comments - if (*praw_line == '\n') { + // also make sure the next char is not 0 + if (*praw_line == '\n' && praw_line[1]) { comment_seen = 0; } struct ulas_ppdef *def = -- 2.30.2