Skip to content
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

[Bug] Optional parameter default values are not deserialized properly #37

Closed
Eideren opened this issue Jun 19, 2021 · 1 comment
Closed
Assignees
Milestone

Comments

@Eideren
Copy link
Contributor

Eideren commented Jun 19, 2021

The default value is interpreted as part of the method body instead of as part of the function signature.
I.E. it outputs

function F( float fParam )
{
    fParam = 0;

While the source is:

function F( float fParam = 0 )
{

To fix this issue you would have to read the start of that function's bytecode, each optional parameter has a corresponding DefaultParameterToken or NothingToken, decompile those inline to the parameter declaration and, when deserializing the function body, skip past those and you are done.
I don't need to fix this issue so I won't do a PR for this one either, sorry.

@EliotVU EliotVU added this to the 1.3.0 milestone Jun 20, 2021
@EliotVU EliotVU modified the milestones: 1.3.0, 1.4.0 May 26, 2022
@EliotVU EliotVU self-assigned this Jun 24, 2022
@EliotVU
Copy link
Owner

EliotVU commented Jun 24, 2022

Thanks! I have just pushed a fix for this issue.

@EliotVU EliotVU closed this as completed Jun 24, 2022
EliotVU added a commit that referenced this issue Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants