projects
/
ulas
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25a31eb
)
macro: Fixed side-effect that was caused by the previous fix
author
Lukas Krickl
<lukas@krickl.dev>
Mon, 14 Apr 2025 15:20:36 +0000
(17:20 +0200)
committer
Lukas Krickl
<lukas@krickl.dev>
Mon, 14 Apr 2025 15:20:36 +0000
(17:20 +0200)
The check should also ensure that the char following the new line
is not 0.
src/ulas.c
patch
|
blob
|
history
diff --git
a/src/ulas.c
b/src/ulas.c
index 3e7d92e724ccf338221e59765daa2defd78944b9..40e6acade94f5c33089c28e26ff6e2c5469dba7d 100644
(file)
--- 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 =