From c7eb70a06f083cfafb0c23feeaf6d25992ab481e Mon Sep 17 00:00:00 2001 From: Luna Date: Tue, 2 Jun 2020 16:16:43 -0300 Subject: [PATCH] ignore lines without commands --- src/main.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.zig b/src/main.zig index a2716d7..4a65230 100644 --- a/src/main.zig +++ b/src/main.zig @@ -208,6 +208,10 @@ pub fn doRepl(allocator: *std.mem.Allocator, args_it: var) !void { std.debug.warn("repl: error while parsing: {}\n", .{err}); continue; }; + + // no command? ignore! + if (cmds_parsed.items.len == 0) continue; + current = cmds_parsed.items[0].*; // by cloning the parent runner, we can iteratively write