diff options
| author | Patrick Schönberger | 2024-04-26 13:28:14 +0200 |
|---|---|---|
| committer | Patrick Schönberger | 2024-04-26 13:28:14 +0200 |
| commit | 2568f51370172fb1f2466b11fcbea748a11c1dd8 (patch) | |
| tree | ac2ee510ee8171411fb19bbc95ccdbf63d79109c | |
| parent | 7800ec8afda9b3e6163a7ff1c372d450411b8ff1 (diff) | |
| download | ziggit-2568f51370172fb1f2466b11fcbea748a11c1dd8.tar.gz ziggit-2568f51370172fb1f2466b11fcbea748a11c1dd8.zip | |
better cli
| -rw-r--r-- | main.zig | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -313,9 +313,9 @@ pub fn main() !void { var inputBuffer = std.mem.zeroes([1024]u8); while (true) { - const input = try r.readUntilDelimiter(&inputBuffer, '\n'); + const input = r.readUntilDelimiter(&inputBuffer, '\n') catch continue; - const id = try std.fmt.parseInt(u160, input, 16); + const id = std.fmt.parseInt(u160, input, 16) catch continue; if (pf.findObjectOffset(id)) |offset| { const o = try pf.getObject(offset); @@ -345,7 +345,7 @@ pub fn main() !void { } print("\n", .{}); } else { - std.debug.print("type: {}\n", .{o.type}); + std.debug.print("type: {}\n{s}\n", .{ o.type, o.data }); } } } |
