From 9e2497f2b8bd19c970e21a3fe9833275f7b17c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 21 Jan 2018 12:23:25 +0100 Subject: [PATCH] Fix wrong constant indices when ConstantIndex copy --- .../flash/action/parser/script/ActionScript2Parser.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScript2Parser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScript2Parser.java index f41ac1076..bb2711836 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScript2Parser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScript2Parser.java @@ -1912,7 +1912,8 @@ public class ActionScript2Parser { orderedConstantPool.add(cval); } if (canChangeConstantIndices) { - ci.index = orderedIndex; + //Do NOT change ci.index directly - it may be cloned from other location + ap.values.set(i, new ConstantIndex(orderedIndex)); } } } @@ -1922,6 +1923,7 @@ public class ActionScript2Parser { if (!canChangeConstantIndices) { //generate again, as number of bytes per ActionPush can change srcList = generateActionList(tree, orderedConstantPool); + //FIXME!!! } for (GraphSourceItem s : srcList) {