commit ff90349542595d85b54597d35849f4dbc47539ed
parent 238d347274b62db3d56ed92f15d68748185da6f8
Author: Sebastian <sebastian@sebsite.pw>
Date: Fri, 27 May 2022 22:35:21 -0400
encoding::utf8: use buffer of size 4
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/encoding/utf8/encode.ha b/encoding/utf8/encode.ha
@@ -20,7 +20,7 @@ export fn encoderune(r: rune) []u8 = {
n = 4;
};
- static let buf: [6]u8 = [0...];
+ static let buf: [4]u8 = [0...];
for (let i = n - 1; i > 0; i -= 1) {
buf[i] = ch: u8 & 0x3F | 0x80;
ch >>= 6;