Fix edge case for overflow buffer.
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 30 Nov 2011 22:40:23 +0000 (22:40 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 30 Nov 2011 22:40:23 +0000 (22:40 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346617 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/asterisk.c

index acddc96..8924fe7 100644 (file)
@@ -2268,6 +2268,8 @@ static int ast_el_read_char(EditLine *editline, char *cp)
                                if (state->prev_line_full && VERBOSE_HASMAGIC(curline)) {
                                        level = VERBOSE_MAGIC2LEVEL(curline);
                                        curline++;
+                               } else {
+                                       level = state->prev_line_verbosity;
                                }
                                if ((!state->prev_line_full && state->prev_line_verbosity <= option_verbose) || (state->prev_line_full && level <= option_verbose)) {
                                        if (write(STDOUT_FILENO, curline, nextline - curline) < 0) {