From 513b2aba468fb903a5f053f5b9e8eee1b9f41eaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Mon, 16 Sep 2024 06:36:00 +0200 Subject: [PATCH] Fixed: #2311 AS1/2 p-code freezing on highlighting ConstantPool --- CHANGELOG.md | 2 ++ .../src/com/jpexs/decompiler/flash/docs/AbstractDocs.java | 8 ++++++++ .../decompiler/flash/locales/docs/pcode/AS2.properties | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 477d5fe27..a170300d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file. - [#2302] AS3 Class linkage - changes did not save - [PR203] AS1/2 extreme lagging - [#2310] Text search history showing as null +- [#2311] AS1/2 p-code freezing on highlighting ConstantPool ## [21.0.5] - 2024-09-05 ### Fixed @@ -3550,6 +3551,7 @@ Major version of SWF to XML export changed to 2. [#2303]: https://www.free-decompiler.com/flash/issues/2303 [#2302]: https://www.free-decompiler.com/flash/issues/2302 [#2310]: https://www.free-decompiler.com/flash/issues/2310 +[#2311]: https://www.free-decompiler.com/flash/issues/2311 [#2293]: https://www.free-decompiler.com/flash/issues/2293 [#2294]: https://www.free-decompiler.com/flash/issues/2294 [#2299]: https://www.free-decompiler.com/flash/issues/2299 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/AbstractDocs.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/AbstractDocs.java index b74f150b7..1e43f01de 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/AbstractDocs.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/AbstractDocs.java @@ -147,6 +147,14 @@ public class AbstractDocs { while (true) { startPos = lexer.yychar(); symb = lexer.lex(); + if (symb.type == ParsedSymbol.TYPE_DOTS) { + endPos = lexer.yychar() + 3; + break; + } + if (symb.type == ParsedSymbol.TYPE_EOF) { + endPos = lexer.yychar(); + break; + } if (symb.type == ParsedSymbol.TYPE_BRACKET_OPEN) { while (symb.type != ParsedSymbol.TYPE_BRACKET_CLOSE && symb.type != ParsedSymbol.TYPE_EOF) { symb = lexer.lex(); 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 e5996fef6..99c69bdb3 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 @@ -458,7 +458,7 @@ action.constantpool.shortDescription=Create a new constant pool action.constantpool.description= action.constantpool.stackBefore= action.constantpool.stackAfter= -action.constantpool.operands=constant1:STRING, constant2:STRING, ... +action.constantpool.operands=constant1:STRING, [constant2:STRING, ...] action.definefunction.name=DefineFunction action.definefunction.code=0x9B action.definefunction.swfVersion=5