aboutsummaryrefslogtreecommitdiff
path: root/src/netaddr.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-06-30 17:02:36 -0400
committerDeterminant <[email protected]>2019-06-30 17:02:36 -0400
commit624550d7e1c032a4d3896ba002aa3ecb895f447c (patch)
treeb33237e20176a03c8963b2185226e05838a62fab /src/netaddr.cpp
parenta53ae6b6ff2faa7fa1d54b3eb662dcfb3591d8ef (diff)
...
Diffstat (limited to 'src/netaddr.cpp')
-rw-r--r--src/netaddr.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/netaddr.cpp b/src/netaddr.cpp
index 736d606..96bdaf9 100644
--- a/src/netaddr.cpp
+++ b/src/netaddr.cpp
@@ -48,6 +48,7 @@ uint16_t netaddr_get_port(const netaddr_t *self) { return self->port; }
netaddr_array_t *netaddr_array_new() { return new netaddr_array_t(); }
netaddr_array_t *netaddr_array_new_from_addrs(const netaddr_t * const *addrs, size_t naddrs) {
auto res = new netaddr_array_t();
+ res->resize(naddrs);
for (size_t i = 0; i < naddrs; i++)
(*res)[i] = *addrs[i];
return res;