]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Extra NULLs in the output cause some terminal types to abort in the middle of
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 21 Jan 2009 21:02:32 +0000 (21:02 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 21 Jan 2009 21:02:32 +0000 (21:02 +0000)
a color code, causing terminal weirdness.
(closes issue #14130)
 Reported by: coolmig
 Patches:
       20090121__bug14130.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, coolmig

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@169722 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/asterisk.c

index 8ef99c68300d2402d59803d002b065080fe6d40b..492af2d9564f2996e1037ce56563d3bc4fba0f75 100644 (file)
@@ -1832,6 +1832,7 @@ static int ast_el_read_char(EditLine *el, char *cp)
                                if (*tmp == 127) {
                                        memmove(tmp, tmp + 1, strlen(tmp));
                                        tmp--;
+                                       res--;
                                }
                        }