aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/evaluate.c
diff options
context:
space:
mode:
Diffstat (limited to 'evaluate.c')
-rw-r--r--evaluate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/evaluate.c b/evaluate.c
index 54cd5fa1..c18ae81d 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -3422,7 +3422,7 @@ static struct symbol *evaluate_symbol(struct symbol *sym)
if (sym->definition && sym->definition != sym)
return evaluate_symbol(sym->definition);
- current_fn = base_type;
+ current_fn = sym;
examine_fn_arguments(base_type);
if (!base_type->stmt && base_type->inline_stmt)
@@ -3453,7 +3453,7 @@ static struct symbol *evaluate_return_expression(struct statement *stmt)
struct symbol *fntype, *rettype;
evaluate_expression(expr);
- fntype = current_fn;
+ fntype = current_fn->ctype.base_type;
rettype = fntype->ctype.base_type;
if (!rettype || rettype == &void_ctype) {
if (expr && expr->ctype != &void_ctype)