From 0551bcebfb699e35c79bad873cc5829899f358ef Mon Sep 17 00:00:00 2001 From: Rene Schallner Date: Tue, 12 Sep 2023 13:53:49 +0200 Subject: [PATCH] attempt to fix #41 --- src/util.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.zig b/src/util.zig index 842b586..d34caf9 100644 --- a/src/util.zig +++ b/src/util.zig @@ -9,7 +9,7 @@ pub fn fio2str(o: fio.FIOBJ) ?[]const u8 { const x: fio.fio_str_info_s = fio.fiobj_obj2cstr(o); if (x.data == 0) return null; // TODO: should we return an error? Actually, looking at fiobj_obj2cstr, this is unreachable - return std.mem.span(x.data); + return x.data[0..x.len]; } pub const FreeOrNot = struct {