Skip to content

Commit

Permalink
Fix BinaryView::GetRelocationsAt C++ API
Browse files Browse the repository at this point in the history
  • Loading branch information
D0ntPanic committed Jan 8, 2024
1 parent c55c722 commit 69b6b8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion binaryview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,8 @@ std::vector<Ref<Relocation>> BinaryView::GetRelocationsAt(uint64_t addr) const
{
size_t count = 0;
BNRelocation** relocations = BNGetRelocationsAt(m_object, addr, &count);
std::vector<Ref<Relocation>> result(count);
std::vector<Ref<Relocation>> result;
result.reserve(count);
for (size_t i = 0; i < count; i++)
{
result.push_back(new Relocation(relocations[i]));
Expand Down

0 comments on commit 69b6b8a

Please sign in to comment.