aboutsummaryrefslogtreecommitdiffhomepage
path: root/c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-10 21:17:24 +0100
committerlemon <lsof@mailbox.org>2025-12-10 21:17:24 +0100
commitdc04469c8c54a8aef99639543ee5b3cafcd2b4dd (patch)
treecfde58744e1a016176c03fb1ee875c3c4de40c56 /c
parent707624e99281241dfc2250c5a2ae4f025d19be5c (diff)
lexer: properly add padding for cpppredefs
Diffstat (limited to 'c')
-rw-r--r--c/lex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/c/lex.c b/c/lex.c
index 8c6e06b..264a0e1 100644
--- a/c/lex.c
+++ b/c/lex.c
@@ -2021,11 +2021,11 @@ addpredefmacros(struct arena **tmparena)
if (ppcmdline.n) {
struct memfile *f;
struct lexer lx[1] = {0};
- vpushn(&ppcmdline, "\0\0\0\0", 5);
lx->fileid = getpredeffile(&f, "<command line>");
assert(!f->p);
- lx->dat = f->p = ppcmdline.p;
lx->ndat = f->n = ppcmdline.n;
+ vpushn(&ppcmdline, "\0\0\0\0\0\0", 6);
+ lx->dat = f->p = ppcmdline.p;
lx->tmparena = tmparena;
lx->chrbuf0 = arraylength(lx->chrbuf);
lx->firstdirective = 1;