always trim the trailing ';'

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Luigi Rizzo
2006-05-01 00:27:27 +00:00
parent 33167fc41c
commit 01360f6440
2 changed files with 7 additions and 11 deletions

View File

@@ -378,9 +378,7 @@ includes { STORE_POS; return KW_INCLUDES;}
<semic>{NOSEMIC}; {
STORE_LOC;
yylval->str = strdup(yytext);
/* XXX maybe the truncation should be unconditional ? */
if(yyleng > 1)
*(yylval->str+yyleng-1)=0;
yylval->str[yyleng-1] = '\0';
unput(';');
BEGIN(0);
return word;