aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-03-18 00:44:08 -0700
committerMichael Forney <mforney@mforney.org>2020-03-18 01:06:27 -0700
commit9ab369a2b826b4a2d0df1afbb43b181b3c2da4f3 (patch)
treece7e468a63963bfa032e645f6fb05e021aab4552
parent5cb3d6896f7c473a7fc66408114db4511fd9504c (diff)
downloadcproc-9ab369a2b826b4a2d0df1afbb43b181b3c2da4f3.tar.xz
pp: Handle #define without trailing newline
-rw-r--r--pp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 7f2731e..bb7b2f4 100644
--- a/pp.c
+++ b/pp.c
@@ -227,7 +227,7 @@ define(void)
m->nparam = params.len / sizeof(m->param[0]);
/* read macro body */
- while (t->kind != TNEWLINE) {
+ while (t->kind != TNEWLINE && t->kind != TEOF) {
if (t->kind == THASHHASH)
error(&t->loc, "'##' operator is not yet implemented");
prev = t->kind;