From 4730d17c4d3d6d78f376cfd2904928b30f6e7413 Mon Sep 17 00:00:00 2001 From: BanceDev Date: Wed, 25 Sep 2024 15:00:49 -0400 Subject: fixed crash from incorrect pointer indexing --- src/lush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lush.c b/src/lush.c index 04e4a91..6a3892f 100644 --- a/src/lush.c +++ b/src/lush.c @@ -1072,7 +1072,7 @@ static int run_command(lua_State *L, char ***commands) { } static int run_command_redirect(lua_State *L, char ***commands, int mode) { - if (commands[2][0] == NULL) + if (commands[2] == NULL) return -1; int saved_stdout = dup(STDOUT_FILENO); -- cgit v1.2.3-59-g8ed1b