From bfcf48a6597a69c7ca92e6e6bd58a94d45178115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Wed, 30 Nov 2022 22:57:03 +0100 Subject: [PATCH] Fixed #1887 AS3 - strict equals operator decompilation --- CHANGELOG.md | 2 ++ .../com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08b1d797b..3091bd706 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file. - Switch decompilation in some corner cases - [#1894] Switches vs loops decompilation (now with two passes) - [#1894] AS3 - XML filters in some corner cases +- [#1887] AS3 - strict equals operator decompilation ## [17.0.2] - 2022-11-22 ### Fixed @@ -2672,6 +2673,7 @@ All notable changes to this project will be documented in this file. [#1891]: https://www.free-decompiler.com/flash/issues/1891 [#1892]: https://www.free-decompiler.com/flash/issues/1892 [#1894]: https://www.free-decompiler.com/flash/issues/1894 +[#1887]: https://www.free-decompiler.com/flash/issues/1887 [#1882]: https://www.free-decompiler.com/flash/issues/1882 [#1880]: https://www.free-decompiler.com/flash/issues/1880 [#1881]: https://www.free-decompiler.com/flash/issues/1881 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java index 86966534f..287867364 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java @@ -1455,6 +1455,7 @@ public class AVM2Graph extends Graph { List caseValuesMapRight = new ArrayList<>(); StrictEqAVM2Item set = (StrictEqAVM2Item) stack.pop(); + StrictEqAVM2Item firstSet = set; caseValuesMapLeft.add(set.leftSide); caseValuesMapRight.add(set.rightSide); @@ -1521,7 +1522,7 @@ public class AVM2Graph extends Graph { } if ((leftReg < 0 && rightReg < 0) || (cnt == 1)) { - stack.push(set); + stack.push(firstSet); } else { part = part.nextParts.get(1); GraphPart defaultPart = part;