Fix an off by one error that causes a crash.
Thanks to Raymond Burke for pointing it out. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@262897 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
5c87b150e6
commit
14ebd39895
|
@ -1196,7 +1196,7 @@ static char *cli_console_active(struct ast_cli_entry *e, int cmd, struct ast_cli
|
|||
return CLI_SUCCESS;
|
||||
}
|
||||
|
||||
if (!(pvt = find_pvt(a->argv[e->args]))) {
|
||||
if (!(pvt = find_pvt(a->argv[e->args - 1]))) {
|
||||
ast_cli(a->fd, "Could not find a device called '%s'.\n", a->argv[e->args]);
|
||||
return CLI_FAILURE;
|
||||
}
|
||||
|
|
Reference in New Issue