IWin32Resource::WriteToDirectory
does not take sorting into account
#532
Labels
Milestone
IWin32Resource::WriteToDirectory
does not take sorting into account
#532
AsmResolver Version
5.5.1
.NET Version
.NET 6.0
Operating System
Windows
Describe the Bug
The PE file format states that entries in the resource directories should be sorted. Currently,
IconResource
andVersionResource
do not take this into account. This results in resources not getting interpreted by Windows (e.g., adding GroupIcon before Icon removes the icons from explorer).How To Reproduce
PEImage
with no win32 resources.IconResource
.ManagedPEFileBuilder
.Expected Behavior
The directories are added in the following order:
Icon
,GroupIcon
.Actual Behavior
The
GroupIcon
directory is added before theIcon
directory.Additional Context
https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#resource-directory-entries
The text was updated successfully, but these errors were encountered: