diff options
author | Russell Bryant <russell@russellbryant.com> | 2010-05-13 15:36:12 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2010-05-13 15:36:12 +0000 |
commit | c26cd3aaacb79c8a81dcb21af6e4113f94875a60 (patch) | |
tree | 3530f7bf5c246e2a59d8f2060cc58a8bdffae10a /channels/chan_console.c | |
parent | 420acb8f0a36ee43dbce14f149e62019db86ca05 (diff) |
Fix an off by one error that causes a crash.
Thanks to Raymond Burke for pointing it out.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_console.c')
-rw-r--r-- | channels/chan_console.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_console.c b/channels/chan_console.c index 6c566e9c9..9d68e9f52 100644 --- a/channels/chan_console.c +++ b/channels/chan_console.c @@ -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; } |