diff options
author | Sverker Eriksson <[email protected]> | 2013-02-08 16:21:07 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-02-08 16:21:07 +0100 |
commit | 7d1060c624676c5dde532d1cb59fa177329f4178 (patch) | |
tree | f7595f06dfb9553b11faf2656aefc175f6915178 /lib/erl_interface/src/decode/decode_pid.c | |
parent | 9a476f1c86845c4bd15ed849f07fc788b593e2fa (diff) | |
parent | f822540687d16eecfcd2d74b55091593c674d478 (diff) | |
download | otp-7d1060c624676c5dde532d1cb59fa177329f4178.tar.gz otp-7d1060c624676c5dde532d1cb59fa177329f4178.tar.bz2 otp-7d1060c624676c5dde532d1cb59fa177329f4178.zip |
Merge branch 'sverk/r16/erl_interface-fixup'
* sverk/r16/erl_interface-fixup:
erl_interface: Fix ei_skip_term
Diffstat (limited to 'lib/erl_interface/src/decode/decode_pid.c')
-rw-r--r-- | lib/erl_interface/src/decode/decode_pid.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/erl_interface/src/decode/decode_pid.c b/lib/erl_interface/src/decode/decode_pid.c index 67ce7e05f9..d429fb2fd8 100644 --- a/lib/erl_interface/src/decode/decode_pid.c +++ b/lib/erl_interface/src/decode/decode_pid.c @@ -29,16 +29,16 @@ int ei_decode_pid(const char *buf, int *index, erlang_pid *p) if (get8(s) != ERL_PID_EXT) return -1; - /* first the nodename */ - if (get_atom(&s, p->node, &p->node_org_enc) < 0) return -1; - - /* now the numbers: num (4), serial (4), creation (1) */ if (p) { + if (get_atom(&s, p->node, &p->node_org_enc) < 0) return -1; p->num = get32be(s) & 0x7fff; /* 15 bits */ p->serial = get32be(s) & 0x1fff; /* 13 bits */ p->creation = get8(s) & 0x03; /* 2 bits */ } - else s+= 9; + else { + if (get_atom(&s, NULL, NULL) < 0) return -1; + s+= 9; + } *index += s-s0; |