mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-04 15:14:49 +00:00
Fixed: #2405 Incorrect saving tags after Cloning / Copy-pasting
This commit is contained in:
@@ -60,6 +60,7 @@ All notable changes to this project will be documented in this file.
|
||||
- AS3 difference between namespace keyword and const of type Namespace
|
||||
- [#2462] AS3 debugger - incorrect line info injected
|
||||
- [#2464] SVG export - minimum stroke width of 1 px
|
||||
- [#2405] Incorrect saving tags after Cloning / Copy-pasting
|
||||
|
||||
## [23.0.1] - 2025-05-16
|
||||
### Fixed
|
||||
@@ -3854,6 +3855,7 @@ Major version of SWF to XML export changed to 2.
|
||||
[#2461]: https://www.free-decompiler.com/flash/issues/2461
|
||||
[#2462]: https://www.free-decompiler.com/flash/issues/2462
|
||||
[#2464]: https://www.free-decompiler.com/flash/issues/2464
|
||||
[#2405]: https://www.free-decompiler.com/flash/issues/2405
|
||||
[#2427]: https://www.free-decompiler.com/flash/issues/2427
|
||||
[#1826]: https://www.free-decompiler.com/flash/issues/1826
|
||||
[#2448]: https://www.free-decompiler.com/flash/issues/2448
|
||||
|
||||
@@ -581,9 +581,15 @@ public abstract class Tag implements NeedsCharacters, Exportable, Serializable {
|
||||
* @throws IOException On I/O error
|
||||
*/
|
||||
public Tag cloneTag() throws InterruptedException, IOException {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
byte[] data = getData();
|
||||
byte[] headerData = getHeader(data.length);
|
||||
baos.write(headerData);
|
||||
baos.write(data);
|
||||
|
||||
byte[] dataWithHeader = baos.toByteArray();
|
||||
SWFInputStream tagDataStream = new SWFInputStream(swf, data, 0, data.length);
|
||||
TagStub copy = new TagStub(swf, getId(), "Unresolved", new ByteArrayRange(data), tagDataStream);
|
||||
TagStub copy = new TagStub(swf, getId(), "Unresolved", new ByteArrayRange(dataWithHeader), tagDataStream);
|
||||
copy.forceWriteAsLong = forceWriteAsLong;
|
||||
return SWFInputStream.resolveTag(copy, 0, false, true, false, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user