diff --git a/Source/util.cpp b/Source/util.cpp index 460dc160..c093a126 100644 --- a/Source/util.cpp +++ b/Source/util.cpp @@ -282,7 +282,7 @@ int generate_unicons_offsets(unsigned char* exeHeader, unsigned char* uninstIcon DWORD dwNextSection; if (i == ntHeaders->FileHeader.NumberOfSections - 1) - dwNextSection = exeheader_size; + dwNextSection = ntHeaders->OptionalHeader.SizeOfImage; else dwNextSection = sectionHeadersArray[i+1].PointerToRawData;