From 1fe5fcabbd8aff8e5a1eeb526892bdad97c7ab0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Sun, 4 May 2014 16:03:07 +0200 Subject: [PATCH] AS3 direct editation: parent constructor call optional parameters fix --- .../flash/abc/avm2/parser/script/AVM2SourceGenerator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java index f1e2516ad..9089bae96 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java @@ -1664,6 +1664,9 @@ public class AVM2SourceGenerator implements SourceGenerator { if (ci > -1) { MethodInfo pmi = a.method_info.get(a.instance_info.get(ci).iinit_index); parentConsAC = pmi.param_types.length; + if(pmi.flagHas_optional()){ + parentConsAC -= pmi.optional.length; + } } }