diff options
| author | Robby Zambito <contact@robbyzambito.me> | 2026-01-24 14:42:34 -0500 |
|---|---|---|
| committer | Robby Zambito <contact@robbyzambito.me> | 2026-01-24 14:42:37 -0500 |
| commit | 8965a4d5d4ce494ae45ea28186379ea7aea9d2e1 (patch) | |
| tree | 23678255604d06661550ae62b1b5417a9314f691 /src | |
| parent | ba8a84c4784b7270ddbdc346459100434200de3a (diff) | |
Skip empty stdin
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.zig | 4 |
1 files changed, 4 insertions, 0 deletions
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)); |
