summaryrefslogtreecommitdiff
path: root/pbx/ael/ael.flex
diff options
context:
space:
mode:
authorLuigi Rizzo <rizzo@icir.org>2006-05-01 00:27:27 +0000
committerLuigi Rizzo <rizzo@icir.org>2006-05-01 00:27:27 +0000
commit01360f64401925047fb5d2ae7b70c64e8f4a9fb5 (patch)
tree022976c47d960774d750e7a042ff7726a57652a9 /pbx/ael/ael.flex
parent33167fc41c5ce015fdc2393a5e9b576e3b85d4a5 (diff)
always trim the trailing ';'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx/ael/ael.flex')
-rw-r--r--pbx/ael/ael.flex4
1 files changed, 1 insertions, 3 deletions
diff --git a/pbx/ael/ael.flex b/pbx/ael/ael.flex
index 9f5e2f67f..04da2b324 100644
--- a/pbx/ael/ael.flex
+++ b/pbx/ael/ael.flex
@@ -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;