From 06c5727e0f032918febee748b6ad6f680f65a6b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 12 Mar 2023 08:08:08 +0100 Subject: [PATCH] Fixed #1990 Cloning DefineSprite causing incorrect tags written --- CHANGELOG.md | 2 ++ .../src/com/jpexs/decompiler/flash/SWFInputStream.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e19e77c0c..1adff4046 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ All notable changes to this project will be documented in this file. - AS3 p-code - IGNORE_REST method flag incorrectly shown as EXPLICIT - [#1989] AS3 - Slow deobfuscation (AVM2DeobfuscatorSimpleOld) - AS3 - getouterscope instruction support +- [#1990] Cloning DefineSprite causing incorrect tags written ### Changed - AS1/2/3 P-code - format Number values with EcmaScript toString function @@ -3006,6 +3007,7 @@ All notable changes to this project will be documented in this file. [#1982]: https://www.free-decompiler.com/flash/issues/1982 [#1986]: https://www.free-decompiler.com/flash/issues/1986 [#1989]: https://www.free-decompiler.com/flash/issues/1989 +[#1990]: https://www.free-decompiler.com/flash/issues/1990 [#1970]: https://www.free-decompiler.com/flash/issues/1970 [#1972]: https://www.free-decompiler.com/flash/issues/1972 [#1973]: https://www.free-decompiler.com/flash/issues/1973 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java index 87a90cfb1..e544ddba5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -1608,7 +1608,7 @@ public class SWFInputStream implements AutoCloseable { tagLength = available; } - ByteArrayRange dataRange = new ByteArrayRange(swf.uncompressedData, (int) pos, (int) (tagLength + headerLength)); + ByteArrayRange dataRange = new ByteArrayRange(this.data, (int) pos, (int) (tagLength + headerLength)); skipBytes(tagLength); TagStub tagStub = new TagStub(swf, tagID, "Unresolved", dataRange, tagDataStream);