Fixed #2008 AS3 P-code editing optional Double value when it has no fractional part

This commit is contained in:
Jindra Petřík
2023-04-15 16:16:00 +02:00
parent 2616b5046d
commit b2d87cf637
2 changed files with 5 additions and 1 deletions

View File

@@ -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

View File

@@ -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);