mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-17 12:51:49 +02:00
Improve MSVC 2015 compatibility
This commit is contained in:
parent
34617bcb44
commit
64f0a545fd
4 changed files with 50 additions and 3 deletions
libi2pd
|
@ -384,7 +384,7 @@ namespace stream
|
|||
memset (p.buf, 0, 22); // minimal header all zeroes
|
||||
memcpy (p.buf + 4, packet->buf, 4); // but receiveStreamID is the sendStreamID from the ping
|
||||
htobe16buf (p.buf + 18, PACKET_FLAG_ECHO); // and echo flag
|
||||
ssize_t payloadLen = packet->len - (packet->GetPayload () - packet->buf);
|
||||
auto payloadLen = int(packet->len) - (packet->GetPayload () - packet->buf);
|
||||
if (payloadLen > 0)
|
||||
memcpy (p.buf + 22, packet->GetPayload (), payloadLen);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue