fix hostname module adding a newline after itself

This commit is contained in:
Squibid 2025-11-06 17:51:24 -05:00
parent 4082f2b015
commit 7a26969f30
Signed by: squibid
GPG key ID: BECE5684D3C4005D

View file

@ -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];
}