diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-17 02:05:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-17 02:05:37 +0300 |
commit | 0be97b4243b5eb51af4705adbb7332bef4476080 (patch) | |
tree | 00c37a9cb370a2685318ef3bb3487ba04f0c04d9 | |
parent | f030a7cfdc61dbc2d0c1600888c595b63b5b823f (diff) | |
download | paranucker-0be97b4243b5eb51af4705adbb7332bef4476080.tar.gz paranucker-0be97b4243b5eb51af4705adbb7332bef4476080.tar.bz2 paranucker-0be97b4243b5eb51af4705adbb7332bef4476080.tar.xz paranucker-0be97b4243b5eb51af4705adbb7332bef4476080.zip |
Fix crash in manaplus compiling.
-rw-r--r-- | src/parsers/expr/call_expr.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/parsers/expr/call_expr.cpp b/src/parsers/expr/call_expr.cpp index 096d2c5..6eecb26 100644 --- a/src/parsers/expr/call_expr.cpp +++ b/src/parsers/expr/call_expr.cpp @@ -39,8 +39,18 @@ void parseCallExprNode(CallExprNode *node) // not recommended // fillExprOperands(node); - node->functionName = internal_fn_name(CALL_EXPR_IFN (node->gccNode)); - Log::dump(node, "- function: %s", node->functionName.c_str()); + if (CALL_EXPR_FN(node->gccNode) != NULL_TREE) + { + node->function = createParseNode( + node, + CALL_EXPR_FN(node->gccNode), + "function"); + } + else + { + node->functionName = internal_fn_name(CALL_EXPR_IFN (node->gccNode)); + Log::dump(node, "- function: %s", node->functionName.c_str()); + } // if (!node->parseChilds) // return; @@ -61,11 +71,6 @@ void parseCallExprNode(CallExprNode *node) if (node->functionName == "LOAD_LANES") return; - - node->function = createParseNode( - node, - CALL_EXPR_FN(node->gccNode), - "function"); } } |