aboutsummaryrefslogtreecommitdiffstats
path: root/ast_expr2.y
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-25 17:03:18 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-25 17:03:18 +0000
commitf60b31e0ec2db9cd52002e2d4b8710d6191e2ee2 (patch)
tree1766f78ab36d92f46f0d0f79b205a86286fa7a22 /ast_expr2.y
parentbbfcc37178c6d5ba1b6f2237d3015aa1fd7ce20b (diff)
Fix expressions on Big Endian platforms (issue #5233)
using bison version 1.875d, flex version 2.5.31 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6645 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'ast_expr2.y')
-rwxr-xr-xast_expr2.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/ast_expr2.y b/ast_expr2.y
index b25917cc4..9aab0f164 100755
--- a/ast_expr2.y
+++ b/ast_expr2.y
@@ -159,7 +159,10 @@ extern int ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
start: expr { ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1);
((struct parse_io *)parseio)->val->type = $$->type;
- ((struct parse_io *)parseio)->val->u.s = $$->u.s; }
+ if( $$->type == AST_EXPR_integer )
+ ((struct parse_io *)parseio)->val->u.i = $$->u.i;
+ else
+ ((struct parse_io *)parseio)->val->u.s = $$->u.s; }
;
expr: TOKEN { $$= $1;}