Skip to content

Commit

Permalink
Merge pull request #22 from qlyoung/fix-do-tab
Browse files Browse the repository at this point in the history
lib: fix crash when tab-completing `do ...` commands
  • Loading branch information
qlyoung authored Dec 19, 2016
2 parents 6cc1ba0 + 55d403c commit 9613309
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9613309

Please sign in to comment.