hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 213c674eda4fbae33b215a02bf416d05786f731c
parent 5ed3445361360773993f0895cd45c9a389093be5
Author: Ember Sawady <ecs@d2evs.net>
Date:   Tue,  3 Oct 2023 11:08:08 +0000

hare::unparse::constant: fix buffer size

Signed-off-by: Ember Sawady <ecs@d2evs.net>

Diffstat:
Mhare/unparse/expr.ha | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hare/unparse/expr.ha b/hare/unparse/expr.ha @@ -638,7 +638,8 @@ fn constant( defer free(s); return syn(ctx, s, synkind::RUNE_STRING)?; case let r: rune => - let buf: [4]u8 = [0...]; + // 4 for unicode codepoint + 2 's + let buf: [6]u8 = [0...]; if (r == '\'' || r == '\\') { return syn(ctx, fmt::bsprintf(buf, `'\{}'`, r), synkind::RUNE_STRING)?;