diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/lineedit.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 625884adf..5daceff16 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -875,9 +875,13 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type) | |||
875 | # endif | 875 | # endif |
876 | # if ENABLE_SHELL_ASH || ENABLE_SHELL_HUSH | 876 | # if ENABLE_SHELL_ASH || ENABLE_SHELL_HUSH |
877 | if (state->get_exe_name) { | 877 | if (state->get_exe_name) { |
878 | i = 0; | 878 | # if ENABLE_SHELL_ASH || (ENABLE_SHELL_HUSH && ENABLE_HUSH_FUNCTIONS) |
879 | exe_state e = { 0, 0, NULL }; | ||
880 | # else | ||
881 | exe_state e = { 0, 0 }; | ||
882 | # endif | ||
879 | for (;;) { | 883 | for (;;) { |
880 | const char *b = state->get_exe_name(i++); | 884 | const char *b = state->get_exe_name(&e); |
881 | if (!b) | 885 | if (!b) |
882 | break; | 886 | break; |
883 | if (strncmp(basecmd, b, baselen) == 0) | 887 | if (strncmp(basecmd, b, baselen) == 0) |