aboutsummaryrefslogtreecommitdiffstats
path: root/src/lush.c
diff options
context:
space:
mode:
authorGravatar BanceDev 2024-09-27 09:13:37 -0400
committerGravatar BanceDev 2024-09-27 09:13:37 -0400
commitb29a99bc4d51c6a5f9d7fa776658b590e8c548fd (patch)
treefaa886be2a97f2b943795556d3d9ccfcfa9785a4 /src/lush.c
parentv0.2.2 (diff)
fixed chaining execution attempting to execute operator
Diffstat (limited to '')
-rw-r--r--src/lush.c5
1 files changed, 4 insertions, 1 deletions
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++;
}
}