diff options
author | Mark Spencer <markster@digium.com> | 2004-05-04 03:23:35 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-05-04 03:23:35 +0000 |
commit | cf0659f7afc5049ec5eedb711da3862ba09ca1c2 (patch) | |
tree | e7cc58a240f333978b45a1ebb1565d38c7ba8502 /ast_expr.y | |
parent | e158ab2fe9012ba07729d22a03b148aac25b688d (diff) |
More expression fixes (bug #1548 again)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'ast_expr.y')
-rwxr-xr-x | ast_expr.y | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ast_expr.y b/ast_expr.y index 4f4bc2375..17ac1e9f9 100755 --- a/ast_expr.y +++ b/ast_expr.y @@ -341,9 +341,18 @@ ast_yylex (YYSTYPE *lvalp, YYLTYPE *yylloc, struct parser_control *karoto) } else if( *t1 == 0 ) { - /* we are done. That was quick */ - p = karoto->ptrptr; - yylloc->last_column = t1 - karoto->argv; + if( t1 != karoto->ptrptr ) + { + /* this is the last token */ + p = karoto->ptrptr; + karoto->ptrptr = t1; + } + else + { + /* we are done. That was quick */ + p = karoto->ptrptr; + yylloc->last_column = t1 - karoto->argv; + } } if( *p == 0 ) p = 0; |