aboutsummaryrefslogtreecommitdiffhomepage
path: root/lex.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-05-28 09:17:02 +0200
committerlemon <lsof@mailbox.org>2023-05-28 09:17:02 +0200
commit0be496ba1ca5695091494576fb18e4368789b491 (patch)
treefc61ddfe2f0f1d4a602175f158ca48c8037768fa /lex.c
parent0f53520c5ee5f07ec2ba0361172fd72bd1456ad4 (diff)
cleanup
Diffstat (limited to 'lex.c')
-rw-r--r--lex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lex.c b/lex.c
index bad05c8..7ffe8e0 100644
--- a/lex.c
+++ b/lex.c
@@ -286,7 +286,7 @@ readstrchrlit(struct parser *pr, struct token *tk, char delim)
vpush(&b, 0);
tk->t = TKSTRLIT;
tk->s.p = alloc(&pr->exarena, b.n, 1);
- memcpy(tk->s.p, b.p, tk->s.n = b.n);
+ memcpy(tk->s.p, b.p, tk->s.n = b.n-1);
} else {
if (b.n == 0) {
span.sl = (struct span0) { idx, pr->chridx - idx, pr->fileid };