Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
erlang
0908-Fix-type-set-by-ei_decode_ei_term.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0908-Fix-type-set-by-ei_decode_ei_term.patch of Package erlang
From b79d3ab050ee0985e59a2da0b125501db1ac1487 Mon Sep 17 00:00:00 2001 From: Rickard Green <rickard@erlang.org> Date: Tue, 5 May 2020 09:41:28 +0200 Subject: [PATCH] Fix type set by ei_decode_ei_term() Set the ei_type field to the same types set by ei_get_type(). --- lib/erl_interface/src/misc/ei_decode_term.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/erl_interface/src/misc/ei_decode_term.c b/lib/erl_interface/src/misc/ei_decode_term.c index 79c8fb4388..72f1e0d511 100644 --- a/lib/erl_interface/src/misc/ei_decode_term.c +++ b/lib/erl_interface/src/misc/ei_decode_term.c @@ -47,25 +47,30 @@ int ei_decode_ei_term(const char* buf, int* index, ei_term* term) break; case ERL_FLOAT_EXT: case NEW_FLOAT_EXT: + term->ei_type = ERL_FLOAT_EXT; return (ei_decode_double(buf, index, &term->value.d_val) < 0 ? -1 : 1); case ERL_ATOM_EXT: case ERL_ATOM_UTF8_EXT: case ERL_SMALL_ATOM_EXT: case ERL_SMALL_ATOM_UTF8_EXT: + term->ei_type = ERL_ATOM_EXT; return (ei_decode_atom(buf, index, term->value.atom_name) < 0 ? -1 : 1); case ERL_REFERENCE_EXT: case ERL_NEW_REFERENCE_EXT: case ERL_NEWER_REFERENCE_EXT: + term->ei_type = ERL_NEW_REFERENCE_EXT; return (ei_decode_ref(buf, index, &term->value.ref) < 0 ? -1 : 1); case ERL_PORT_EXT: case ERL_NEW_PORT_EXT: + term->ei_type = ERL_PORT_EXT; return (ei_decode_port(buf, index, &term->value.port) < 0 ? -1 : 1); case ERL_PID_EXT: case ERL_NEW_PID_EXT: + term->ei_type = ERL_PID_EXT; return (ei_decode_pid(buf, index, &term->value.pid) < 0 ? -1 : 1); case ERL_SMALL_TUPLE_EXT: -- 2.26.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor