Skip to content

Commit

Permalink
Assume safe append for the payload length when receiving data
Browse files Browse the repository at this point in the history
  • Loading branch information
Burgos committed Dec 22, 2016
1 parent a755953 commit 0b78020
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/message.d
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0b78020

Please sign in to comment.