Skip to content

Commit

Permalink
lib: fix crash when tab-completing do ... commands
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
  • Loading branch information
qlyoung committed Dec 18, 2016
1 parent 6cc1ba0 commit 55d403c
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 55d403c

Please sign in to comment.