Fixed: #2486 AS ifs with direct breaks (in obfuscated code)

This commit is contained in:
Jindra Petřík
2025-07-13 21:32:45 +02:00
parent fe420b7727
commit 2c5f4c9774
9 changed files with 112 additions and 7 deletions

View File

@@ -549,19 +549,26 @@ public class Graph {
}
List<GraphPart> loopContinues = new ArrayList<>();
List<GraphPart> loopBreaks = new ArrayList<>();
for (Loop l : loops) {
if (l.phase == 1) {
loopContinues.add(l.loopContinue);
if (l.loopPreContinue != null) {
loopContinues.add(l.loopPreContinue);
}
}
if (l.loopBreak != null) {
loopBreaks.add(l.loopBreak);
}
}
}
for (GraphPart p : parts) {
if (loopContinues.contains(p)) {
break;
}
if (loopBreaks.contains(p)) {
break;
}
boolean common = true;
for (GraphPart q : parts) {
if (q == p) {
@@ -596,6 +603,9 @@ public class Graph {
if (loopContinues.contains(p)) {
return null;
}
if (loopBreaks.contains(p)) {
return null;
}
return p;
}
}