From: Lukas Krickl Date: Mon, 14 Apr 2025 15:20:36 +0000 (+0200) Subject: macro: Fixed side-effect that was caused by the previous fix X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=c9f6fcc8d2c0ec3ef38d6592bdfde1c4fe41fa27;p=ulas%2F.git 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. --- 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 =