mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-02 18:44:37 +00:00
Fixed #2077 AS3 try..catch parts outside block
Fixed AS3 try..catch inside loop unneccessary continue
This commit is contained in:
@@ -64,6 +64,7 @@ public class ActionScript3DeobfuscatorTest extends ActionScriptTestBase {
|
||||
Configuration.decompilationTimeoutSingleMethod.set(Integer.MAX_VALUE);
|
||||
Configuration.padAs3PCodeInstructionName.set(false);
|
||||
Configuration.useOldStyleGetSetLocalsAs3PCode.set(false);
|
||||
Configuration.labelOnSeparateLineAs3PCode.set(true);
|
||||
swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as3/as3.swf")), false);
|
||||
}
|
||||
|
||||
|
||||
@@ -1899,8 +1899,8 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
+ "}\r\n"
|
||||
+ "catch(e:Error)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "return 4;\r\n"
|
||||
+ "}\r\n",
|
||||
+ "}\r\n"
|
||||
+ "return 4;\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@@ -2138,11 +2138,9 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
+ "}\r\n"
|
||||
+ "catch(e:EOFError)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "continue;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "catch(e:Error)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "continue;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
|
||||
@@ -1883,8 +1883,8 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
+ "}\r\n"
|
||||
+ "catch(e:Error)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "return 4;\r\n"
|
||||
+ "}\r\n",
|
||||
+ "}\r\n"
|
||||
+ "return 4;\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@@ -2128,11 +2128,9 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
+ "}\r\n"
|
||||
+ "catch(e:EOFError)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "continue;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "catch(e:Error)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "continue;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
|
||||
@@ -155,11 +155,9 @@ public class ActionScript3CrossCompileDecompileTest extends ActionScript3Decompi
|
||||
+ "}\r\n"
|
||||
+ "catch(e:EOFError)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "continue;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "catch(e:Error)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "continue;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
@@ -216,8 +214,8 @@ public class ActionScript3CrossCompileDecompileTest extends ActionScript3Decompi
|
||||
+ "catch(e:Error)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"in catch\");\r\n"
|
||||
+ "a++;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "a++;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "return \"OK\";\r\n",
|
||||
false);
|
||||
@@ -242,8 +240,8 @@ public class ActionScript3CrossCompileDecompileTest extends ActionScript3Decompi
|
||||
+ "catch(e:Error)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"in catch2\");\r\n"
|
||||
+ "trace(\"a=\" + a);\r\n"
|
||||
+ "}\r\n"
|
||||
+ "trace(\"a=\" + a);\r\n"
|
||||
+ "}\r\n"
|
||||
+ "trace(\"after\");\r\n",
|
||||
false);
|
||||
@@ -342,8 +340,8 @@ public class ActionScript3CrossCompileDecompileTest extends ActionScript3Decompi
|
||||
+ "catch(e:Error)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"in catch\");\r\n"
|
||||
+ "trace(\"a=\" + a);\r\n"
|
||||
+ "}\r\n"
|
||||
+ "trace(\"a=\" + a);\r\n"
|
||||
+ "}\r\n"
|
||||
+ "trace(\"after\");\r\n",
|
||||
false);
|
||||
|
||||
@@ -146,11 +146,9 @@ public class ActionScript3CrossCompileSwfToolsDecompileTest extends ActionScript
|
||||
+ "}\r\n"
|
||||
+ "catch(e:EOFError)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "continue;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "catch(e:Error)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "continue;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
@@ -246,7 +244,7 @@ public class ActionScript3CrossCompileSwfToolsDecompileTest extends ActionScript
|
||||
+ "_loc1_ = 0;\r\n"
|
||||
+ "var _loc2_:int = 0;\r\n"
|
||||
+ "_loc2_ = 5;\r\n"
|
||||
+ "while(_loc1_ < 10)\r\n"
|
||||
+ "for(; _loc1_ < 10; _loc1_++)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "try\r\n"
|
||||
+ "{\r\n"
|
||||
@@ -260,7 +258,6 @@ public class ActionScript3CrossCompileSwfToolsDecompileTest extends ActionScript
|
||||
+ "throw new Error(\"Problem: \" + _loc3_);\r\n"
|
||||
+ "}\r\n"
|
||||
+ "}\r\n"
|
||||
+ "_loc1_++;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "trace(\"after\");\r\n",
|
||||
false);
|
||||
|
||||
Reference in New Issue
Block a user