diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a2e4c488..75af31a01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ All notable changes to this project will be documented in this file. - Pin header for AS2 script in the Resources view should show Class name in the title instead of tag full description - AS1/2/3 for decompilation with multiple variables +- AS3 native functions outside class allowed ## [23.0.1] - 2025-05-16 ### Fixed diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java index a55a1d4b5..af06d5527 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java @@ -1104,7 +1104,7 @@ public class ActionScript3Parser { boolean isInternal = false; NamespaceItem ns = packageInternalNs; List preSymbols = new ArrayList<>(); - while (s.isType(SymbolType.FINAL, SymbolType.DYNAMIC, SymbolType.PUBLIC, SymbolType.INTERNAL)) { + while (s.isType(SymbolType.FINAL, SymbolType.DYNAMIC, SymbolType.PUBLIC, SymbolType.INTERNAL, SymbolType.NATIVE)) { if (s.type == SymbolType.FINAL) { if (isFinal) { throw new AVM2ParseException("Only one final keyword allowed", lexer.yyline()); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3SimpleParser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3SimpleParser.java index c21c49c32..e909b98bf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3SimpleParser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3SimpleParser.java @@ -887,7 +887,7 @@ public class ActionScript3SimpleParser implements SimpleParser { boolean isNative = false; boolean isInternal = false; List preSymbols = new ArrayList<>(); - while (s.isType(SymbolType.FINAL, SymbolType.DYNAMIC, SymbolType.PUBLIC, SymbolType.INTERNAL)) { + while (s.isType(SymbolType.FINAL, SymbolType.DYNAMIC, SymbolType.PUBLIC, SymbolType.INTERNAL, SymbolType.NATIVE)) { if (s.type == SymbolType.FINAL) { if (isFinal) { errors.add(new SimpleParseException("Only one final keyword allowed", lexer.yyline(), s.position));