mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-11 04:02:16 +00:00
Issue #576 AS1/2 direct editation: DefineFunction2 fix
AS1/2 property fix
This commit is contained in:
@@ -279,7 +279,7 @@ public class FunctionActionItem extends ActionItem {
|
||||
suppressThisFlag,
|
||||
preloadThisFlag,
|
||||
preloadGlobalFlag,
|
||||
registerNames.size() - 1, len, SWF.DEFAULT_VERSION, paramNames, paramRegs));
|
||||
registerNames.size(), len, SWF.DEFAULT_VERSION, paramNames, paramRegs));
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -43,6 +43,10 @@ public class ActionGetProperty extends Action {
|
||||
if (index instanceof DirectValueActionItem) {
|
||||
if (((DirectValueActionItem) index).value instanceof Long) {
|
||||
indexInt = (int) (long) (Long) ((DirectValueActionItem) index).value;
|
||||
} else if (((DirectValueActionItem) index).value instanceof Double) {
|
||||
indexInt = (int) Math.round((Double) ((DirectValueActionItem) index).value);
|
||||
} else if (((DirectValueActionItem) index).value instanceof Float) {
|
||||
indexInt = (int) Math.round((Float) ((DirectValueActionItem) index).value);
|
||||
}
|
||||
}
|
||||
stack.push(new GetPropertyActionItem(this, target, indexInt));
|
||||
|
||||
@@ -53,6 +53,10 @@ public class ActionSetProperty extends Action {
|
||||
if (index instanceof DirectValueActionItem) {
|
||||
if (((DirectValueActionItem) index).value instanceof Long) {
|
||||
indexInt = (int) (long) (Long) ((DirectValueActionItem) index).value;
|
||||
} else if (((DirectValueActionItem) index).value instanceof Double) {
|
||||
indexInt = (int) Math.round((Double) ((DirectValueActionItem) index).value);
|
||||
} else if (((DirectValueActionItem) index).value instanceof Float) {
|
||||
indexInt = (int) Math.round((Float) ((DirectValueActionItem) index).value);
|
||||
}
|
||||
}
|
||||
if (value.getThroughDuplicate() instanceof IncrementActionItem) {
|
||||
|
||||
Reference in New Issue
Block a user