diff options
author | Matt Jordan <mjordan@digium.com> | 2016-01-21 17:25:03 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-01-21 17:25:03 -0600 |
commit | 1943561691827dbb6027482c9b55eab1a2e89555 (patch) | |
tree | ea041f23ad5ddb70ce38a336edfd797385b3e3f2 | |
parent | 53570e2c6fecc4debab93b7a8e70765306154001 (diff) | |
parent | b259ac95acefd67a90a451f55acab7fd6ce77d97 (diff) |
Merge "main/asterisk.c: ast_el_read_char"
-rw-r--r-- | main/asterisk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index a7842a6ab..ca560cdb2 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -2708,11 +2708,12 @@ static int ast_el_read_char(EditLine *editline, char *cp) console_print(buf, 0); - if ((res < EL_BUF_SIZE - 1) && ((buf[res-1] == '\n') || (buf[res-2] == '\n'))) { + if ((res < EL_BUF_SIZE - 1) && ((buf[res-1] == '\n') || (res >= 2 && buf[res-2] == '\n'))) { *cp = CC_REFRESH; return(1); - } else + } else { lastpos = 1; + } } } |