summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-08-23 00:01:12 +0200
committerJo-Philipp Wich <jo@mein.io>2020-08-23 00:01:12 +0200
commit8a821177b01984715b42035186f562b5a427732e (patch)
treea2dcf1d4d0296991a90a485da66f450047e84354
parentddb04196ad091e52a84bc381f6744184b4a871a8 (diff)
eval.c: fix segfault when invoking a tagged non-function lvalue
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
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",