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 b5329b2a0..054620b25 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 @@ -1000,7 +1000,7 @@ public class ActionScript3Parser { } } - List importedClasses = parseImportsUsages(openedNamespaces, numberUsageRef, numberPrecisionRef, numberRoundingRef); + List importedClasses = parseImportsUsages(openedNamespaces, numberUsageRef, numberPrecisionRef, numberRoundingRef, abc); boolean isEmpty = true; @@ -2607,7 +2607,7 @@ public class ActionScript3Parser { private List constantPool; - private List parseImportsUsages(List openedNamespaces, Reference numberUsageRef, Reference numberPrecisionRef, Reference numberRoundingRef) throws IOException, AVM2ParseException, InterruptedException { + private List parseImportsUsages(List openedNamespaces, Reference numberUsageRef, Reference numberPrecisionRef, Reference numberRoundingRef, ABC abc) throws IOException, AVM2ParseException, InterruptedException { ParsedSymbol s; List importedClasses = new ArrayList<>(); @@ -2666,6 +2666,10 @@ public class ActionScript3Parser { s = lex(); } } else { + if (!abc.hasDecimalSupport()) { + throw new AVM2ParseException("Invalid use kind", lexer.yyline()); + } + expected(s, lexer.yyline(), SymbolType.IDENTIFIER); String pragmaItemName = (String) s.value; switch (pragmaItemName) {