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

Perform ternary conditional injections before branch injections (#828) #828

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

cgewecke
Copy link
Member

@cgewecke cgewecke commented Jan 25, 2024

In #821, a ternary conditional is placed directly after an unbracketed else statement as below

if (false) {} else i == 0 ? i = 0 : i--;

Several injections are necessary at the same location here and the order in which they happen matters. Because the branch injection for the else occurred first, it was being located inside the ternary clause as below

else {
  ((c_8d074f5a(0x65ac343036e60c28); /*else branch */ 
  i == 0 || c_false8d074f5a(0x1ca8ac37326695dd)) && c_true8d074f5a(0x909a47063763861b)) ? i = 0 : i--;}
}

This PR explicitly prioritizes branch injections over conditional component injections

@cgewecke cgewecke changed the title Inject ternary conditionals before branches Inject ternary conditionals after branches Jan 25, 2024
@cgewecke cgewecke changed the title Inject ternary conditionals after branches Perform ternary conditional injections before branch injections (#828) Jan 25, 2024
@cgewecke cgewecke merged commit 7c0f13a into master Jan 25, 2024
3 checks passed
@cgewecke cgewecke deleted the fix-ternary-821 branch January 25, 2024 21:53
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