hare

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

commit 99cfa06b3e2a5eed6fe5188f7f85e79445131138
parent ce9ae0b5203f377ae9cc0621d9a7edc939bf5fc5
Author: Sebastian <sebastian@sebsite.pw>
Date:   Mon,  9 May 2022 18:40:39 -0400

rt+test: remove NUL from ztos string

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mrt/+test/ztos.ha | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/rt/+test/ztos.ha b/rt/+test/ztos.ha @@ -15,7 +15,7 @@ fn bytes_reverse(b: []u8) void = { }; fn ztos(u: size) const str = { - static let buf: [21]u8 = [0...]; // 20 digits plus NUL + static let buf: [20]u8 = [0...]; buf = [0...]; let s = struct { @@ -36,6 +36,5 @@ fn ztos(u: size) const str = { }; bytes_reverse(s.b[..s.l]); - s.b[s.l] = 0; return *(&s: *str); };