From 45a63ea020fbadd5bf6b71ebb83d3e08526f32fa Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Tue, 20 May 2008 14:20:54 +0000 Subject: [PATCH] iterate the number of sections, not the number of directory entries svn path=/trunk/; revision=33611 --- reactos/tools/pefixup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) &&