From b29a99bc4d51c6a5f9d7fa776658b590e8c548fd Mon Sep 17 00:00:00 2001 From: BanceDev Date: Fri, 27 Sep 2024 09:13:37 -0400 Subject: fixed chaining execution attempting to execute operator --- src/lush.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lush.c') diff --git a/src/lush.c b/src/lush.c index 68447b0..ed6450b 100644 --- a/src/lush.c +++ b/src/lush.c @@ -1186,9 +1186,12 @@ int lush_execute_chain(lua_State *L, char ***commands, int num_commands) { continue; } } - if (commands[0] != NULL) { + // Run the command or move past the operator + if (commands[0] != NULL && !is_operator(commands[0][0])) { last_result = run_command(L, commands); commands += 2; + } else { + commands++; } } -- cgit v1.2.3-59-g8ed1b