From 2be45ea245e52e852a35fec9c5b53a1c55d546ff Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 3 Jul 2018 20:35:54 +0200 Subject: erl_interface: Fix bug in ei_*receive_msg* functions --- lib/erl_interface/src/connect/ei_connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/erl_interface') diff --git a/lib/erl_interface/src/connect/ei_connect.c b/lib/erl_interface/src/connect/ei_connect.c index 34f4620866..fe5f38419e 100644 --- a/lib/erl_interface/src/connect/ei_connect.c +++ b/lib/erl_interface/src/connect/ei_connect.c @@ -999,7 +999,7 @@ int ei_do_receive_msg(int fd, int staticbuffer_p, erl_errno = EMSGSIZE; return ERL_ERROR; } - x->index = x->buffsz; + x->index = msglen; switch (msg->msgtype) { /* FIXME does not handle trace tokens and monitors */ case ERL_SEND: case ERL_REG_SEND: -- cgit v1.2.3