mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-28 02:20:51 +00:00
Fixed: #2291 AS1/2 Incorrect var keyword placement causing registers to compile wrong
This commit is contained in:
@@ -2775,7 +2775,7 @@ public class AVM2Code implements Cloneable {
|
||||
//Check whether the command references internal traits of other package
|
||||
ti.visitRecursively(new AbstractGraphTargetVisitor() {
|
||||
@Override
|
||||
public void visit(GraphTargetItem item) {
|
||||
public boolean visit(GraphTargetItem item) {
|
||||
if (item instanceof GetSlotAVM2Item) {
|
||||
GetSlotAVM2Item gs = (GetSlotAVM2Item) item;
|
||||
if ((gs.slotObject instanceof GlobalAVM2Item) && (initializerType == GraphTextWriter.TRAIT_SCRIPT_INITIALIZER)) {
|
||||
@@ -2798,6 +2798,7 @@ public class AVM2Code implements Cloneable {
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -2277,9 +2277,9 @@ public class AVM2Graph extends Graph {
|
||||
private boolean handled = false;
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetItem item) {
|
||||
public boolean visit(GraphTargetItem item) {
|
||||
if (handled) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
if ((item instanceof NextNameAVM2Item) || (item instanceof NextValueAVM2Item)) {
|
||||
handled = true;
|
||||
@@ -2293,7 +2293,9 @@ public class AVM2Graph extends Graph {
|
||||
nn.localReg = hn.index;
|
||||
kindRef.setVal(2);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user