diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-08-23 00:01:12 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-08-23 00:01:12 +0200 |
commit | 8a821177b01984715b42035186f562b5a427732e (patch) | |
tree | a2dcf1d4d0296991a90a485da66f450047e84354 | |
parent | ddb04196ad091e52a84bc381f6744184b4a871a8 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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", |