diff options
author | Sverker Eriksson <[email protected]> | 2019-08-19 18:35:59 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2019-08-19 18:35:59 +0200 |
commit | 2f30bd2f28f87b80dfa1329f33d4d590a027f6ec (patch) | |
tree | 5eeaf10ed1e93e95d8147efed31b9e27c02aebec /lib | |
parent | c7dc74e82cd15a21e9fb91cc72aa27ac869ed2c7 (diff) | |
parent | c4ad27e24c8f28ad62f1d3afffaaa6033a460996 (diff) | |
download | otp-2f30bd2f28f87b80dfa1329f33d4d590a027f6ec.tar.gz otp-2f30bd2f28f87b80dfa1329f33d4d590a027f6ec.tar.bz2 otp-2f30bd2f28f87b80dfa1329f33d4d590a027f6ec.zip |
Merge branch 'sverker/erl_interface/ei_decode_fun-fix/OTP-15996' into maint
* sverker/erl_interface/ei_decode_fun-fix/OTP-15996:
erl_interface: Fix bug in ei_decode_fun for very old encoding
Diffstat (limited to 'lib')
-rw-r--r-- | lib/erl_interface/src/decode/decode_fun.c | 5 |
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 */ |