mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-17 17:02:43 +00:00
test, refactor: Fix -Warray-bounds warning
This commit is contained in:
parent
faf2759c8c
commit
7a4901c902
@ -1301,7 +1301,7 @@ public:
|
||||
{
|
||||
// Construct contents consisting of 0x00 + 12-byte message type + payload.
|
||||
std::vector<uint8_t> contents(1 + CMessageHeader::MESSAGE_TYPE_SIZE + payload.size());
|
||||
std::copy(mtype.begin(), mtype.end(), reinterpret_cast<char*>(contents.data() + 1));
|
||||
std::copy(mtype.begin(), mtype.end(), contents.begin() + 1);
|
||||
std::copy(payload.begin(), payload.end(), contents.begin() + 1 + CMessageHeader::MESSAGE_TYPE_SIZE);
|
||||
// Send a packet with that as contents.
|
||||
SendPacket(contents);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user