diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2024-01-08 15:16:06 -0700 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2024-01-08 15:16:06 -0700 |
| commit | 69b6b8a0853a8d54151a1888e29817f67b0ee645 (patch) | |
| tree | 23fdca0c2c49ef86337f6bdf71ca19f152dedd7d /binaryview.cpp | |
| parent | c55c72208f0dd97810d816c44b9a489031818dc3 (diff) | |
Fix BinaryView::GetRelocationsAt C++ API
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index ad73cc33..0d3e51c3 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -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])); |
