diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ae9f8cd1..24342657c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ All notable changes to this project will be documented in this file. - #1254 FLA export - placing AS3 classes to FLA directory instead of scripts dir - Mac OS X installer fix (.pkg) - #1289 AS1/2 direct editation - variables used in inner functions must not be stored in local registers +- #1283 AS3 Unbounded Vector - Vector<*> decompilation and direct editation fix ## [9.0.0] - 2016-08-12 ### Added diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java index db54fc321..c78ecea02 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java @@ -2688,7 +2688,7 @@ public class AVM2SourceGenerator implements SourceGenerator { int[] params = new int[atype.params.size()]; int i = 0; for (GraphTargetItem s : atype.params) { - params[i++] = resolveType(localData, s, abcIndex); + params[i++] = (s instanceof NullAVM2Item) ? 0 : resolveType(localData, s, abcIndex); } return constants.getMultinameId(Multiname.createTypeName(name_index, params), true); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java index 22755433a..ed2a9d99a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java @@ -24,6 +24,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.FindPropertyStrictIns; import com.jpexs.decompiler.flash.abc.avm2.model.ApplyTypeAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.InitVectorAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.NullAVM2Item; import com.jpexs.decompiler.flash.abc.types.MethodBody; import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.abc.types.Namespace; @@ -115,6 +116,9 @@ public class PropertyAVM2Item extends AssignableAVM2Item { if (r == null) { return null; } + if (pm == 0) { + r = new NullAVM2Item(null, null); + } params.add(r); } return new ApplyTypeAVM2Item(null, null, obj, params);