From e436dccb075169243b8bc0ef1616e1c0b6822957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 21 Jan 2018 10:07:05 +0100 Subject: [PATCH] Direct editation of AS2 classes - minor changes to make it closer to original compiler --- .../flash/action/parser/script/ActionSourceGenerator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java index 3e4e6b73d..7ffe49060 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java @@ -669,7 +669,7 @@ public class ActionSourceGenerator implements SourceGenerator { } List val = new ArrayList<>(); - val.add(new ActionPush((Long) 0L)); + val.add(new ActionPush((Double) 0.0)); val.add(pushConst("Object")); val.add(new ActionNewObject()); notBody.addAll(typeToActions(globalClassTypeStr, val)); @@ -707,11 +707,11 @@ public class ActionSourceGenerator implements SourceGenerator { if (!isInterface) { val.add(new ActionStoreRegister(1)); } - constr.addAll(typeToActions(globalClassTypeStr, val)); + constr.addAll(typeToActions(nameStr, val)); } else { constr.addAll(toActionList(((FunctionActionItem) constructor).toSource(localData, this))); constr.add(new ActionStoreRegister(1)); - constr = (typeToActions(globalClassTypeStr, constr)); + constr = (typeToActions(nameStr, constr)); } if (!isInterface) { for (int pass = 1; pass <= 2; pass++) { //two passes, methods first, then variables @@ -740,7 +740,7 @@ public class ActionSourceGenerator implements SourceGenerator { if (!isInterface) { ifbody.add(new ActionPush((Long) 1L)); ifbody.add(new ActionPush(Null.INSTANCE)); - ifbody.addAll(typeToActions(globalClassTypeStr, null)); + ifbody.addAll(typeToActions(nameStr, null)); ifbody.add(pushConst("prototype")); ifbody.add(new ActionGetMember()); ifbody.add(new ActionPush((Long) 3L));