diff --git a/CHANGELOG.md b/CHANGELOG.md index f00f7b794..76c6622e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. ### Fixed - [#2004] Freezing when a shape has nonimage character set as fill - [#2004] Nonrepeating fill border +- [#2008] AS3 P-code editing optional Double value when it has no fractional part ## [18.4.1] - 2023-04-05 ### Fixed @@ -3032,6 +3033,7 @@ All notable changes to this project will be documented in this file. [alpha 7]: https://github.com/jindrapetrik/jpexs-decompiler/releases/tag/alpha7 [#1998]: https://www.free-decompiler.com/flash/issues/1998 [#2004]: https://www.free-decompiler.com/flash/issues/2004 +[#2008]: https://www.free-decompiler.com/flash/issues/2008 [#1993]: https://www.free-decompiler.com/flash/issues/1993 [#1994]: https://www.free-decompiler.com/flash/issues/1994 [#1477]: https://www.free-decompiler.com/flash/issues/1477 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java index 7416614bf..47225fb3d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java @@ -619,8 +619,10 @@ public class ASM3Parser { value = lexer.lex(); if (value.type == ParsedSymbol.TYPE_KEYWORD_NULL) { value_index = 0; + } else if (value.type == ParsedSymbol.TYPE_INTEGER) { + value_index = constants.getDoubleId((Integer) value.value, true); } else { - expected(value, ParsedSymbol.TYPE_FLOAT, "Double or null"); + expected(value, ParsedSymbol.TYPE_FLOAT, "Integer, double or null"); value_index = constants.getDoubleId((Double) value.value, true); } expected(ParsedSymbol.TYPE_PARENT_CLOSE, ")", lexer);