From ab8b2e24db15f090db940835815596a7cbd81ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Mon, 29 Nov 2021 07:50:57 +0100 Subject: [PATCH] Fixed AS1/2 - delete on nonmember --- CHANGELOG.md | 1 + .../flash/action/parser/script/ActionScript2Parser.java | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 039a46805..a334a2746 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ All notable changes to this project will be documented in this file. - AS1/2 - spacing in with statement - Playercontrols frame display incorrect frame - AS1/2 - empty parenthesis nullpointer +- AS1/2 - delete on nonmember ## [14.6.0] - 2021-11-22 ### Added diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScript2Parser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScript2Parser.java index d42ac8196..eeedc229a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScript2Parser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScript2Parser.java @@ -1872,7 +1872,10 @@ public class ActionScript2Parser { GetMemberActionItem gm = (GetMemberActionItem) varDel; ret = new DeleteActionItem(null, null, gm.object, gm.memberName); } else { - throw new ActionParseException("Not a property", lexer.yyline()); + if (varDel instanceof VariableActionItem) { + varDel = pushConst(((VariableActionItem) varDel).getVariableName()); + } + ret = new DeleteActionItem(null, null, null, varDel); } break; case INCREMENT: