aboutsummaryrefslogtreecommitdiffstats
path: root/ast_expr.y
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-04 03:23:35 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-04 03:23:35 +0000
commitf48a4080eff862ecedd90c771e9507ac923e6131 (patch)
treee7cc58a240f333978b45a1ebb1565d38c7ba8502 /ast_expr.y
parentbabbe84ed27b5b92c5e277d21dc9baa94c8786d8 (diff)
More expression fixes (bug #1548 again)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2883 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'ast_expr.y')
-rwxr-xr-xast_expr.y15
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;