Skip to content

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
@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.

2 participants