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

[CExpressionGenerator] MemberAccess/Call on complex expression is missing parentheses #361

Closed
rihi opened this issue Nov 9, 2023 · 3 comments · Fixed by #372
Closed
Assignees
Labels
bug Something isn't working priority-low Low priority issue

Comments

@rihi
Copy link
Collaborator

rihi commented Nov 9, 2023

When a member access happens on a complex expression like var + 1, the outputted c code is missing a parentheses like var + 1->member.

Relevant code: https://github.com/fkie-cad/dewolf/blob/0ff5502be6de63db3a8f5e023495e3d2a8c3a0ee/decompiler/backend/cexpressiongenerator.py#L168C1-L172

@rihi rihi added bug Something isn't working priority-low Low priority issue labels Nov 9, 2023
@rihi
Copy link
Collaborator Author

rihi commented Nov 22, 2023

This also seems to include Calls on expressions, like a + 1() should be (a +1)().

@rihi rihi changed the title [CExpressionGenerator] MemberAccess on complex expression is missing parentheses [CExpressionGenerator] MemberAccess/Call on complex expression is missing parentheses Nov 22, 2023
@rihi rihi self-assigned this Nov 30, 2023
@rihi
Copy link
Collaborator Author

rihi commented Nov 30, 2023

/cib

Copy link
Contributor

github-actions bot pushed a commit that referenced this issue Nov 30, 2023
rihi added a commit that referenced this issue Dec 6, 2023
0x6e62 pushed a commit that referenced this issue Dec 7, 2023
…sing parentheses (#372)

* Create draft PR for #361
* Fix incorrect braces on call/memberaccess

---------

Co-authored-by: rihi <[email protected]>
Co-authored-by: rihi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low Low priority issue
Projects
None yet
1 participant