Skip to content

Commit

Permalink
Merge branch 'BasedInc:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
phasephasephase authored Oct 5, 2024
2 parents 135c454 + 2cfdb9a commit c1ac193
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 c1ac193

Please sign in to comment.