mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-06 03:19:03 +00:00
Fixed AS1/2 - spacing in with statement
This commit is contained in:
@@ -43,6 +43,7 @@ All notable changes to this project will be documented in this file.
|
||||
- AS1/2 - class detection with ternars
|
||||
- AS1/2 - empty tellTarget
|
||||
- AS1/2 - deobfuscate object literal names
|
||||
- AS1/2 - spacing in with statement
|
||||
|
||||
## [14.6.0] - 2021-11-22
|
||||
### Added
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.action.model.clauses;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -59,11 +60,10 @@ public class WithActionItem extends ActionItem {
|
||||
}
|
||||
writer.append("(");
|
||||
scope.toString(writer, localData);
|
||||
scope.toString(writer, localData);
|
||||
writer.append(")").startBlock();
|
||||
for (GraphTargetItem ti : items) {
|
||||
ti.toString(writer, localData).newLine();
|
||||
}
|
||||
writer.append(")");
|
||||
appendBlock(null, writer, localData, items);
|
||||
|
||||
return writer;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,4 +83,10 @@ public class WithActionItem extends ActionItem {
|
||||
public boolean hasReturnValue() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needsSemicolon() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2368,4 +2368,21 @@ public class ActionScript2Test extends ActionScript2TestBase {
|
||||
+ "trace(\"E\");\r\n"
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void frame84_withTest() {
|
||||
compareSrc(84, "trace(\"withTest\");\r\n"
|
||||
+ "trace(\"before\");\r\n"
|
||||
+ "with(_root.something)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "somesub = 5;\r\n"
|
||||
+ "with(subvar)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "somesub2 = 4;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "trace(\"after1\");\r\n"
|
||||
+ "}\r\n"
|
||||
+ "trace(\"after\");\r\n"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
BIN
libsrc/ffdec_lib/testdata/as2/as2.fla
vendored
BIN
libsrc/ffdec_lib/testdata/as2/as2.fla
vendored
Binary file not shown.
BIN
libsrc/ffdec_lib/testdata/as2/as2.swf
vendored
BIN
libsrc/ffdec_lib/testdata/as2/as2.swf
vendored
Binary file not shown.
Reference in New Issue
Block a user