Skip to content

Fix __FUNCSIG__ parsing on x86 by explicitly declaring the calling convention #405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jediry
Copy link

@jediry jediry commented Apr 7, 2025

This change fixes parsing of enum value names on MSVC x86, by explicitly specifying the calling convention as __cdecl. Calling conventions aren't really a thing on x64, but on x86 the default calling convention can be changed w/ compiler flags. Since the parsing of the enum out of FUNCSIG relies on the precise format of this string, the calling convention needs to be __cdecl, or else the location of the ( )s is different than expected.

To fix my usage of magic_enum, I needed to add __cdecl to the instance on line 497, but I suspect that the other two functions that similarly parse these magic symbols also need this treatment to function properly on x86 under all possible default calling conventions, so I went ahead and fixed them as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant