aboutsummaryrefslogtreecommitdiffhomepage
path: root/lex.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-10-16 17:53:42 +0200
committerlemon <lsof@mailbox.org>2025-10-16 17:53:42 +0200
commitd051c17c70c86b3c9bbc0a0761203d97e8c662d0 (patch)
tree0a4b1e27b5a7ef3092a476952727def0900d496a /lex.c
parent77b13b42643991fc8c2b8942ca167eb7bf156908 (diff)
various little bugs
Diffstat (limited to 'lex.c')
-rw-r--r--lex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lex.c b/lex.c
index 6dbc324..e668500 100644
--- a/lex.c
+++ b/lex.c
@@ -1168,6 +1168,7 @@ expandfnmacro(struct lexer *lx, struct span *span, struct macro *mac)
goto Redo;
}
tk.t = TKSTRLIT;
+ tk.wide = 0;
tk.s = buf.buf != tmp ? buf.buf : alloccopy(lx->tmparena, buf.buf, buf.len, 1);
tk.len = buf.len-1;
vpush(&rlist2, tk);
@@ -1771,6 +1772,7 @@ mac__file__handler(struct lexer *lx, struct token *tk)
{
tk->t = TKSTRLIT;
tk->s = getfilename(lx->fileid);
+ tk->wide = 0;
tk->len = strlen(tk->s);
}
@@ -1797,6 +1799,7 @@ mac__date__handler(struct lexer *lx, struct token *tk)
time_t tm = time(NULL);
struct tm *ts = localtime(&tm);
tk->t = TKSTRLIT;
+ tk->wide = 0;
tk->len = 11;
if (ts) {
bfmt(&wbuf, "%S %2d %4d%c",
@@ -1818,6 +1821,7 @@ mac__time__handler(struct lexer *lx, struct token *tk)
time_t tm = time(NULL);
struct tm *ts = localtime(&tm);
tk->t = TKSTRLIT;
+ tk->wide = 0;
tk->len = 8;
if (ts) {
bfmt(&wbuf, "%.2d:%.2d:%.2d%c", ts->tm_hour, ts->tm_min, ts->tm_sec, 0);