JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler

NEW : We have got a new blog where we post some interesting SWF internals info.

List of issuesList of issues

#1497 Constant pool strings not being reused when editing swf
Date created:
Type: bug
Visibility: Everybody
Assigned to:
State: closed Help

> What steps will reproduce the problem? Decompile an swf and try to edit a script to use an existing constant string. (Either pcode or actionscript) > What is the expected output? What do you see instead? Instead of it reusing the existing constant from the decompiled swf, it creates a new one. (Subsequent edits will use the newly created constant, not create more) This is a problem when the original constant and the newly created clone have indexes with a different number of bytes because the pcode will always use the newly created constant in edits, you have to edit the raw hex manually to use the original constant, which will mis-align the offsets. > What version of the product are you using? Is it "nightly build"? Which operating system do you have? Windows 10 ffdec 11.2.0 > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you.
This does not seem to happen for me. I tried AS1 code in 11.2.0: ; 88 08 00 03 00 41 00 42 00 43 00 ConstantPool "A" "B" "C" ; 96 05 00 00 4e 65 77 00 Push "New" ; 26 Trace ; 96 02 00 08 01 Push "B" ; 26 Trace ; 00 Added "New" string - it created string without using constantpool. When I manually add "New" to constantpool at the end, ; 88 0c 00 04 00 41 00 42 00 43 00 4e 65 77 00 ConstantPool "A" "B" "C" "New" ; 96 02 00 08 03 Push "New" ; 26 Trace ; 96 02 00 08 01 Push "B" ; 26 Trace ; 00 It uses it as new constant index. The indices remained the same. So I think there is no problem for AS1/2 P-code. Or can you send an example code where it's a problem? For the ActionScript editor (not a P-code one), creating new constantpool is expected, so this cannot lead to same code. Or are you talking about AS3? It's four years so you probably do not remember. Anyway, here's my statement that I cannot reproduce that.
I tried to reproduce this about a year ago and I couldn't either, so feel free to close this.
State: new→closed