From 7a26969f307fc295db70762648092e770a80d158 Mon Sep 17 00:00:00 2001 From: Squibid Date: Thu, 6 Nov 2025 17:51:24 -0500 Subject: [PATCH] fix hostname module adding a newline after itself --- src/modules/hostname.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/hostname.zig b/src/modules/hostname.zig index 068d357..8741a64 100644 --- a/src/modules/hostname.zig +++ b/src/modules/hostname.zig @@ -8,7 +8,7 @@ fn cb() ![]const u8 { const max_hostname_size = c.sysconf(c._SC_HOST_NAME_MAX); const buffer = try std.heap.page_allocator.alloc(u8, @intCast(max_hostname_size)); - const bytes_read = try file.read(buffer); + const bytes_read = try file.read(buffer) - 1; return buffer[0..bytes_read]; }