diff options
| author | Jeremy Rubin <[email protected]> | 2017-02-19 13:18:04 -0500 |
|---|---|---|
| committer | Jeremy Rubin <[email protected]> | 2017-07-08 13:31:47 -0700 |
| commit | e0451e3e2af64cc975dd76389dc3ea4f8b9c2a62 (patch) | |
| tree | cc4517d114d57436167929e05804f6548a87fb52 /src/net.cpp | |
| parent | Merge #10759: Fix multi_rpc test for hosts that dont default to utf8 (diff) | |
| download | discoin-e0451e3e2af64cc975dd76389dc3ea4f8b9c2a62.tar.xz discoin-e0451e3e2af64cc975dd76389dc3ea4f8b9c2a62.zip | |
Fix subscript[0] bug in net.cpp if GetGroup returns a 0-sized vector
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index 301cf58b8..5bf3af7ea 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2876,5 +2876,5 @@ uint64_t CConnman::CalculateKeyedNetGroup(const CAddress& ad) const { std::vector<unsigned char> vchNetGroup(ad.GetGroup()); - return GetDeterministicRandomizer(RANDOMIZER_ID_NETGROUP).Write(&vchNetGroup[0], vchNetGroup.size()).Finalize(); + return GetDeterministicRandomizer(RANDOMIZER_ID_NETGROUP).Write(vchNetGroup.data(), vchNetGroup.size()).Finalize(); } |