diff options
| author | Quentin Young <qlyoung@users.noreply.github.com> | 2016-12-19 17:35:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-19 17:35:03 -0500 |
| commit | 96133092e02c7b07c9e4c6d3e26b871551fa0cef (patch) | |
| tree | 5cc2a36365bae6ccb0507ea02b6a7616b76bbfc7 /lib/command.c | |
| parent | 6cc1ba027fdfbe7f7f9c9aa552f36f80950a4a64 (diff) | |
| parent | 55d403c9b225e4bdb18037983de062d66017d684 (diff) | |
Merge pull request #22 from qlyoung/fix-do-tab
lib: fix crash when tab-completing `do ...` commands
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c index a93f3a55e8..ca0d0c001b 100644 --- a/lib/command.c +++ b/lib/command.c @@ -667,7 +667,7 @@ cmd_complete_command (vector vline, struct vty *vty, int *status) // construct the input line we'll be matching on unsigned int offset = (do_shortcut) ? 1 : 0; for (unsigned index = 0; index + offset < vector_active (vline); index++) - vector_set_index (input_line, index + offset, vector_lookup (vline, index)); + vector_set_index (input_line, index, vector_lookup (vline, index + offset)); // get token completions -- this is a copying operation vector comps = NULL, initial_comps; |
