Skip to content

Commit 69b6b8a

Browse files
committed
Fix BinaryView::GetRelocationsAt C++ API
1 parent c55c722 commit 69b6b8a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

binaryview.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,8 @@ std::vector<Ref<Relocation>> BinaryView::GetRelocationsAt(uint64_t addr) const
16111611
{
16121612
size_t count = 0;
16131613
BNRelocation** relocations = BNGetRelocationsAt(m_object, addr, &count);
1614-
std::vector<Ref<Relocation>> result(count);
1614+
std::vector<Ref<Relocation>> result;
1615+
result.reserve(count);
16151616
for (size_t i = 0; i < count; i++)
16161617
{
16171618
result.push_back(new Relocation(relocations[i]));

0 commit comments

Comments
 (0)