diff --git a/erts/emulator/beam/erl_term.c b/erts/emulator/beam/erl_term.c index 1e96d8abbe3f..02fcd7836db8 100644 --- a/erts/emulator/beam/erl_term.c +++ b/erts/emulator/beam/erl_term.c @@ -47,6 +47,9 @@ erts_set_literal_tag(Eterm *term, Eterm *hp_start, Eterm hsz) break; case TAG_PRIMARY_HEADER: if (header_is_thing(*hp)) { + if (*hp == HEADER_SUB_BITS) { + ((ErlSubBits*)hp)->orig |= TAG_LITERAL_PTR; + } hp += thing_arityval(*hp); } break;