diff --git a/src/message.d b/src/message.d index d4e98c1..9e17f3c 100644 --- a/src/message.d +++ b/src/message.d @@ -96,7 +96,8 @@ struct Message c.receive(len); // Receive payload - payload.length = len - len.sizeof; + payload.length = 0; + payload.assumeSafeAppend.length = len - len.sizeof; c.receive(payload); foreach (msg_type; MessageTypes)