This updates the correct field rather than assigning the new max icon ID
to a local variable. Previously, if you had set an icon with ten images
and then later set a new icon with only one image, nine old images would
linger in the executable. If you revised your icon over time and reduced
the number of images each time, old icons from multiple different passes
would linger in the executable.
This bug was introduced by af37f5f which landed after the fix to a
similar bug that was described in issue #27.
I tested this and keeps the old icon data, I'm updating a .NET exe with 10 icons and tried to add a new one with 4 icons in it and the file size increased of the new icon
This updates the correct field rather than assigning the new max icon ID to a local variable. Previously, if you had set an icon with ten images and then later set a new icon with only one image, nine old images would linger in the executable. If you revised your icon over time and reduced the number of images each time, old icons from multiple different passes would linger in the executable.
This bug was introduced by af37f5f which landed after the fix to a similar bug that was described in issue #27.