diff --git a/reactos/tools/pefixup.c b/reactos/tools/pefixup.c index 12c5b51cd46..f26c2b7a396 100644 --- a/reactos/tools/pefixup.c +++ b/reactos/tools/pefixup.c @@ -201,7 +201,7 @@ void *rva_to_ptr(DWORD rva) unsigned int i; for (i = 0, section_header = IMAGE_FIRST_SECTION(nt_header); - i < dtohl(nt_header->OptionalHeader.NumberOfRvaAndSizes); + i < dtohl(nt_header->FileHeader.NumberOfSections); i++, section_header++) { if (rva >= dtohl(section_header->VirtualAddress) &&