Skip to content

Commit 2f18d10

Browse files
committed
Fix section size on Windows side
1 parent 60e2c8a commit 2f18d10

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/windows/module.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
#include <cstring>
1313
#include <cmath>
1414

15-
namespace DynLibUtils {
15+
namespace DynLibUtils
16+
{
1617

1718
template<typename Mutex>
1819
CAssemblyModule<Mutex>::~CAssemblyModule()
@@ -127,7 +128,7 @@ bool CAssemblyModule<Mutex>::LoadFromPath(const std::string_view svModelePath, i
127128
for (WORD i = 0; i < pNTHeaders->FileHeader.NumberOfSections; ++i) // Loop through the sections.
128129
{
129130
const IMAGE_SECTION_HEADER& hCurrentSection = hSection[i]; // Get current section.
130-
m_vecSections.emplace_back(static_cast<std::uintptr_t>(reinterpret_cast<std::uintptr_t>(handle) + hCurrentSection.VirtualAddress), hCurrentSection.SizeOfRawData, reinterpret_cast<const char*>(hCurrentSection.Name)); // Push back a struct with the section data.
131+
m_vecSections.emplace_back(static_cast<std::uintptr_t>(reinterpret_cast<std::uintptr_t>(handle) + hCurrentSection.VirtualAddress), hCurrentSection.Misc.VirtualSize, reinterpret_cast<const char*>(hCurrentSection.Name)); // Push back a struct with the section data.
131132
}
132133

133134
SetPtr(static_cast<void *>(handle));

0 commit comments

Comments
 (0)