Fixed AS1/2 - switch detection

This commit is contained in:
Jindra Petřík
2021-11-27 18:38:23 +01:00
parent 7b2f893c56
commit 44da53dfab
2 changed files with 7 additions and 1 deletions

View File

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