From 8965a4d5d4ce494ae45ea28186379ea7aea9d2e1 Mon Sep 17 00:00:00 2001 From: Robby Zambito Date: Sat, 24 Jan 2026 14:42:34 -0500 Subject: Skip empty stdin --- src/main.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/main.zig b/src/main.zig index 01ff410..3fcdeda 100644 --- a/src/main.zig +++ b/src/main.zig @@ -107,6 +107,10 @@ pub fn main(init: std.process.Init) !void { var stdin = &limited.interface; while (stdin.fillMore()) { + // Sometimes fillMore will return 0 bytes. + // Skip these + if (stdin.seek == stdin.end) continue; + chunk_writer.end = 0; try chunk_writer.print("{b64}", .{stdin.buffered()}); try client.sendRelay(init.io, chunk_writer.buffered(), parseDest(flags.dest)); -- cgit