aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface
diff options
context:
space:
mode:
Diffstat (limited to 'lib/erl_interface')
-rw-r--r--lib/erl_interface/src/decode/decode_fun.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/erl_interface/src/decode/decode_fun.c b/lib/erl_interface/src/decode/decode_fun.c
index db71007505..76dc0e2ab8 100644
--- a/lib/erl_interface/src/decode/decode_fun.c
+++ b/lib/erl_interface/src/decode/decode_fun.c
@@ -52,7 +52,10 @@ int ei_decode_fun(const char *buf, int *index, erlang_fun *p)
switch (get8(s)) {
case ERL_FUN_EXT:
/* mark as old (R7 and older) external fun */
- if (p != NULL) p->arity = -1;
+ if (p != NULL) {
+ p->type = EI_FUN_CLOSURE;
+ p->arity = -1;
+ }
/* first number of free vars (environment) */
n = get32be(s);
/* then the pid */