diff options
author | Russell Bryant <russell@russellbryant.com> | 2005-09-25 17:03:18 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2005-09-25 17:03:18 +0000 |
commit | 168733a179fba0e4ddfc8aa6db57bac85b10745b (patch) | |
tree | 1766f78ab36d92f46f0d0f79b205a86286fa7a22 /ast_expr2.y | |
parent | 9804f96c0f9aa59055e547f384bd4d02189e6e1b (diff) |
Fix expressions on Big Endian platforms (issue #5233)
using bison version 1.875d, flex version 2.5.31
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'ast_expr2.y')
-rwxr-xr-x | ast_expr2.y | 5 |
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;} |