hare

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

commit bc22c2d246b7dcb531608b7fa4b3a848d70e9068
parent 893a7416aab3af31cee4271f5c2a8a9ce44cfd89
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sat,  9 Apr 2022 14:34:55 -0400

rt: account for NUL byte in from_c_unsafe capacity

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

Diffstat:
Mrt/+test/cstring.ha | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rt/+test/cstring.ha b/rt/+test/cstring.ha @@ -13,7 +13,7 @@ fn from_c_unsafe(cstr: *const char) const str = { const s = struct { data: *[*]u8 = cstr: *[*]u8, length: size = l, - capacity: size = l, + capacity: size = l + 1, }; return *(&s: *const str); };