From 8a821177b01984715b42035186f562b5a427732e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 23 Aug 2020 00:01:12 +0200 Subject: eval.c: fix segfault when invoking a tagged non-function lvalue Signed-off-by: Jo-Philipp Wich --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval.c b/eval.c index 0de6dd8..1d202c5 100644 --- a/eval.c +++ b/eval.c @@ -867,7 +867,7 @@ ut_execute_call(struct ut_state *state, struct ut_opcode *op) struct json_object *rv; char *lhs; - if (!decl) { + if (!decl || decl->type != T_FUNC) { lhs = ut_ref_to_str(op->operand[0]); rv = ut_exception(state, op->operand[0], "Type error: %s is not a function", -- cgit v1.2.3