diff options
Diffstat (limited to 'common/command.c')
-rw-r--r-- | common/command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/command.c b/common/command.c index 625571d..597ab4c 100644 --- a/common/command.c +++ b/common/command.c @@ -184,10 +184,10 @@ static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv /* output full list of commands */ for (; cmdtp != cmdend; cmdtp++) { if (n_found >= maxv - 2) { - cmdv[n_found] = "..."; + cmdv[n_found++] = "..."; break; } - cmdv[n_found] = cmdtp->name; + cmdv[n_found++] = cmdtp->name; } cmdv[n_found] = NULL; return n_found; |