Skip to content

Commit b6856eb

Browse files
committed
Fix subscript[0] in netaddress.cpp
1 parent 361d952 commit b6856eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/netaddress.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ std::vector<unsigned char> CService::GetKey() const
573573
{
574574
std::vector<unsigned char> vKey;
575575
vKey.resize(18);
576-
memcpy(&vKey[0], ip, 16);
576+
memcpy(vKey.data(), ip, 16);
577577
vKey[16] = port / 0x100;
578578
vKey[17] = port & 0x0FF;
579579
return vKey;

0 commit comments

Comments
 (0)