test, refactor: Fix -Warray-bounds warning
This commit is contained in:
1 parent
faf2759c8c
commit
7a4901c902
1 file changed
+1
-1
@@ -1301,7 +1301,7 @@ public:
|
|||||||
{
|
{
|
||||||
// Construct contents consisting of 0x00 + 12-byte message type + payload.
|
// Construct contents consisting of 0x00 + 12-byte message type + payload.
|
||||||
std::vector<uint8_t> contents(1 + CMessageHeader::MESSAGE_TYPE_SIZE + payload.size());
|
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);
|
std::copy(payload.begin(), payload.end(), contents.begin() + 1 + CMessageHeader::MESSAGE_TYPE_SIZE);
|
||||||
// Send a packet with that as contents.
|
// Send a packet with that as contents.
|
||||||
SendPacket(contents);
|
SendPacket(contents);
|
||||||
|
|||||||
Reference in new issue
Block a user