Open
Conversation
This pull request introduces a Ruby-based implementation of the previously C-based `edicon.exe`. Opting for a Ruby reimplement over fixing the existing C code will shorten the build times and make maintenance easier, leveraging widely accessible Microsoft documentation. Reference Information: The original `edicon.c` contained several issues that are being addressed by this reimplementation: - `BeginUpdateResource` was incorrectly compared to `INVALID_HANDLE_VALUE`. Proper error checking requires comparison to `NULL`. - The calculation of `GroupIconSize` was incorrect. It should have been calculated using the size of `IconDirResEntry` multiplied by the number of images, instead of using `IconDirectoryEntry`. This reimplement ensures that the functionality of `EdIcon` is preserved while simplifying future enhancements and maintenance.
23b6597 to
4084207
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a Ruby-based implementation of the previously C-based
edicon.exe. Opting for a Ruby reimplement over fixing the existing C code will shorten the build times and make maintenance easier, leveraging widely accessible Microsoft documentation.Reference Information:
The original
edicon.ccontained several issues that are being addressed by this reimplementation:BeginUpdateResourcewas incorrectly compared toINVALID_HANDLE_VALUE. Proper error checking requires comparison toNULL.(ocran/src/edicon.c
Line 58 in 201f51a
GroupIconSizewas incorrect. It should have been calculated using the size ofIconDirResEntrymultiplied by the number of images, instead of usingIconDirectoryEntry.(ocran/src/edicon.c
Line 97 in 201f51a
This reimplement ensures that the functionality of
EdIconis preserved while simplifying future enhancements and maintenance.