From 8453e48ba75a6dcb2763369ff7c867e0cbba6861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 18 Nov 2023 01:04:57 +0100 Subject: [PATCH] Fixed #2127 Wrong parameter order in AS1/2 P-code Action GetURL2 documentation Changed #2127 AS1/2 P-code Action GetURL2 switched parameters back - correct order is (loadVariablesFlag, loadTargetFlag, sendVarsMethod), code from 19.1.x to 20.0.0 is still accepted --- CHANGELOG.md | 4 ++++ .../jpexs/decompiler/flash/action/swf4/ActionGetURL2.java | 4 ++-- .../jpexs/decompiler/flash/locales/docs/pcode/AS2.properties | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 779b4cb2f..abbfc3d8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,9 +28,12 @@ All notable changes to this project will be documented in this file. - [#2111] AS3 direct editation - access class in class initializer - [#2111] Flex AS3 editation - use SWF dependencies defined in GUI - SWF dependencies label was not updated on startup +- [#2127] Wrong parameter order in AS1/2 P-code Action GetURL2 documentation ### Changed - [#2120] Exported assets no longer take names from assigned classes if there is more than 1 assigned class +- [#2127] AS1/2 P-code Action GetURL2 switched parameters back - correct order is (loadVariablesFlag, loadTargetFlag, sendVarsMethod), + code from 19.1.x to 20.0.0 is still accepted ## [20.0.0] - 2023-11-05 ### Added @@ -3287,6 +3290,7 @@ Major version of SWF to XML export changed to 2. [#2122]: https://www.free-decompiler.com/flash/issues/2122 [#2111]: https://www.free-decompiler.com/flash/issues/2111 [#2120]: https://www.free-decompiler.com/flash/issues/2120 +[#2127]: https://www.free-decompiler.com/flash/issues/2127 [#1130]: https://www.free-decompiler.com/flash/issues/1130 [#1220]: https://www.free-decompiler.com/flash/issues/1220 [#1717]: https://www.free-decompiler.com/flash/issues/1717 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java index edb2f1b4a..b451cdee4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java @@ -87,7 +87,7 @@ public class ActionGetURL2 extends Action { @Override public String toString() { - return "GetURL2 " + sendVarsMethod + ", " + loadVariablesFlag + ", " + loadTargetFlag; + return "GetURL2 " + loadVariablesFlag + ", " + loadTargetFlag + ", " + sendVarsMethod; } @Override @@ -113,7 +113,7 @@ public class ActionGetURL2 extends Action { ASMParsedSymbol symb = lexer.lex(); boolean sendVarsMethodLast = false; - if (symb.type == ASMParsedSymbol.TYPE_BOOLEAN) { //backwards compatibility + if (symb.type == ASMParsedSymbol.TYPE_BOOLEAN) { //backwards compatibility. In 19.1.0 up to 20.0.0 sendVarsMethod is first sendVarsMethodLast = true; } lexer.pushback(symb); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS2.properties b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS2.properties index a275bd988..9d3b16735 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS2.properties +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS2.properties @@ -377,10 +377,11 @@ action.geturl2.name = GetURL2 action.geturl2.code = 0x9A action.geturl2.swfVersion = 4 action.geturl2.shortDescription = Get a URL (stack based) -action.geturl2.description = +action.geturl2.description = action.geturl2.stackBefore = target, url action.geturl2.stackAfter = -action.geturl2.operands = sendVarsMethod:integer, loadTargetFlag:boolean, loadVariablesFlag:boolean +# Note: official documentation has the order of fields wrong +action.geturl2.operands = loadVariablesFlag:boolean, loadTargetFlag:boolean, sendVarsMethod:integer action.gotoframe2.name = GotoFrame2 action.gotoframe2.code = 0x9F