From b6856ebedcd3a1c3cfed5397f477f869688a715b Mon Sep 17 00:00:00 2001 From: Jeremy Rubin Date: Sun, 19 Feb 2017 13:43:46 -0500 Subject: [PATCH] Fix subscript[0] in netaddress.cpp --- src/netaddress.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netaddress.cpp b/src/netaddress.cpp index 89f257c642..110e778fbd 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -573,7 +573,7 @@ std::vector CService::GetKey() const { std::vector vKey; vKey.resize(18); - memcpy(&vKey[0], ip, 16); + memcpy(vKey.data(), ip, 16); vKey[16] = port / 0x100; vKey[17] = port & 0x0FF; return vKey;