From: Tilghman Lesher Date: Tue, 6 May 2008 19:31:39 +0000 (+0000) Subject: Don't print the terminating NUL. (Closes issue #12589) X-Git-Tag: 1.4.20~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=273afe2080ebaa0388dfb78677c219fff34312f7;p=thirdparty%2Fasterisk.git Don't print the terminating NUL. (Closes issue #12589) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115415 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/asterisk.c b/main/asterisk.c index 1d3e11b79a..37823e9891 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -2321,7 +2321,7 @@ static void ast_remotecontrol(char * data) /* Skip verbose lines */ if (*curline != 127) { not_written = 0; - write(STDOUT_FILENO, curline, nextline - curline + (*nextline == '\0' ? 1 : 0)); + write(STDOUT_FILENO, curline, nextline - curline); } curline = nextline; } while (!ast_strlen_zero(curline));