Skip to content

Commit

Permalink
Revert change that used incorrect variable for section count
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroMemes committed Oct 5, 2024
1 parent c1863ad commit 2cfdb9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/os/win32/Process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ namespace hat::process {
const auto& ntHeaders = getNTHeaders(*this);

const auto* sectionHeader = IMAGE_FIRST_SECTION(&ntHeaders);
for (DWORD i = 0; i < ntHeaders.OptionalHeader.NumberOfRvaAndSizes; i++, sectionHeader++) {
for (WORD i = 0; i < ntHeaders.FileHeader.NumberOfSections; i++, sectionHeader++) {
const std::string_view sectionName{
reinterpret_cast<const char*>(sectionHeader->Name),
strnlen_s(reinterpret_cast<const char*>(sectionHeader->Name), IMAGE_SIZEOF_SHORT_NAME)
Expand Down

0 comments on commit 2cfdb9a

Please sign in to comment.