mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-04 05:15:10 +00:00
Fixed AS1/2 - switch detection
This commit is contained in:
@@ -25,6 +25,7 @@ All notable changes to this project will be documented in this file.
|
||||
- AS1/2 - obfuscated name in forin cannot use eval
|
||||
- Ternar visit (can cause invalid reg declarations)
|
||||
- AS1/2 - typeof precedence / parenthesis
|
||||
- AS1/2 - switch detection
|
||||
|
||||
## [14.6.0] - 2021-11-22
|
||||
### Added
|
||||
|
||||
@@ -416,7 +416,7 @@ public class ActionGraph extends Graph {
|
||||
}
|
||||
}
|
||||
if (switchedObject == null) {
|
||||
switchedObject = new DirectValueActionItem(null, null, -1, Null.INSTANCE, null);
|
||||
//switchedObject = new DirectValueActionItem(null, null, -1, Null.INSTANCE, null);
|
||||
}
|
||||
List<GraphTargetItem> caseValuesMap = new ArrayList<>();
|
||||
|
||||
@@ -428,6 +428,11 @@ public class ActionGraph extends Graph {
|
||||
if (set.leftSide instanceof GetVariableActionItem) {
|
||||
switchedObject = set.leftSide;
|
||||
}
|
||||
|
||||
if (switchedObject == null) {
|
||||
stack.push(set);
|
||||
return ret;
|
||||
}
|
||||
List<GraphPart> caseBodyParts = new ArrayList<>();
|
||||
caseBodyParts.add(part.nextParts.get(0));
|
||||
GraphTargetItem top = null;
|
||||
|
||||
Reference in New Issue
Block a user