aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-10-31 17:13:47 +0000
committerRon Yorston <rmy@pobox.com>2015-10-31 17:13:47 +0000
commit4432dbba6559d3d88e18ecf2c33d9e5a39e82074 (patch)
treef6db886523a04e0b45926336223ff8c32761dc43 /libbb/lineedit.c
parentbc09f29f78547856e2152dc47051aeed548f28e8 (diff)
parent6bd3fff51aa74e2ee2d87887b12182a3b09792ef (diff)
downloadbusybox-w32-4432dbba6559d3d88e18ecf2c33d9e5a39e82074.tar.gz
busybox-w32-4432dbba6559d3d88e18ecf2c33d9e5a39e82074.tar.bz2
busybox-w32-4432dbba6559d3d88e18ecf2c33d9e5a39e82074.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 5cb40a508..04361b509 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -829,10 +829,12 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type)
829 if (type == FIND_EXE_ONLY) { 829 if (type == FIND_EXE_ONLY) {
830 const char *p = applet_names; 830 const char *p = applet_names;
831 831
832 for (i=0; i < NUM_APPLETS; i++) { 832 i = 0;
833 while (i < NUM_APPLETS) {
833 if (strncmp(pfind, p, pf_len) == 0) 834 if (strncmp(pfind, p, pf_len) == 0)
834 add_match(xstrdup(p)); 835 add_match(xstrdup(p));
835 p += strlen(p) + 1; 836 p += strlen(p) + 1;
837 i++;
836 } 838 }
837 } 839 }
838#endif 840#endif