From 02cd80d7e92ada4a5fabf58ad87ae3a867ce57a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Thu, 11 Jul 2013 11:59:30 +0200 Subject: [PATCH] Issue #213 AS1/2 CallMethod parenthesis fix --- .../flash/action/treemodel/CallMethodTreeItem.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/action/treemodel/CallMethodTreeItem.java b/trunk/src/com/jpexs/decompiler/flash/action/treemodel/CallMethodTreeItem.java index 21793e750..4587866e3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/treemodel/CallMethodTreeItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/treemodel/CallMethodTreeItem.java @@ -57,7 +57,11 @@ public class CallMethodTreeItem extends TreeItem { if (blankMethod) { return scriptObject.toString(constants) + hilight("(") + paramStr + hilight(")"); } - return scriptObject.toString(constants) + hilight(".") + stripQuotes(methodName, constants) + hilight("(") + paramStr + hilight(")"); + String soStr = scriptObject.toString(constants); + if (scriptObject.precedence > this.precedence) { + soStr = "(" + soStr + ")"; + } + return soStr + hilight(".") + stripQuotes(methodName, constants) + hilight("(") + paramStr + hilight(")"); } @Override