From 60d544a63d6f12b4f7a1288b1b6567e9cb514322 Mon Sep 17 00:00:00 2001 From: Craig Wisniewski Date: Fri, 12 Feb 2021 20:51:34 +1030 Subject: [PATCH 1/2] Fix for the execFunction() cast bug --- .../net/rptools/maptool/client/functions/ExecFunction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/rptools/maptool/client/functions/ExecFunction.java b/src/main/java/net/rptools/maptool/client/functions/ExecFunction.java index 9e93b4caad..3d8383d890 100644 --- a/src/main/java/net/rptools/maptool/client/functions/ExecFunction.java +++ b/src/main/java/net/rptools/maptool/client/functions/ExecFunction.java @@ -20,6 +20,7 @@ import java.util.List; import net.rptools.maptool.client.MapTool; import net.rptools.maptool.client.MapToolExpressionParser; +import net.rptools.maptool.client.MapToolVariableResolver; import net.rptools.maptool.client.functions.json.JSONMacroFunctions; import net.rptools.maptool.client.functions.json.JsonArrayFunctions; import net.rptools.maptool.language.I18N; @@ -203,7 +204,7 @@ private static void runExecFunction(String functionName, List execArgs) Function function = parser.getFunction(functionName); MapTool.getParser().enterTrustedContext(functionName, "execFunction"); try { - function.evaluate(parser, new MapVariableResolver(), functionName, execArgs); + function.evaluate(parser, new MapToolVariableResolver(null), functionName, execArgs); } catch (ParserException ignored) { } MapTool.getParser().exitContext(); From cef0bfdf8294e44013c9af4927cb45319fbbef7b Mon Sep 17 00:00:00 2001 From: Craig Wisniewski Date: Fri, 12 Feb 2021 21:03:43 +1030 Subject: [PATCH 2/2] formatting fix --- .../java/net/rptools/maptool/client/functions/ExecFunction.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/net/rptools/maptool/client/functions/ExecFunction.java b/src/main/java/net/rptools/maptool/client/functions/ExecFunction.java index 3d8383d890..15369b763a 100644 --- a/src/main/java/net/rptools/maptool/client/functions/ExecFunction.java +++ b/src/main/java/net/rptools/maptool/client/functions/ExecFunction.java @@ -25,7 +25,6 @@ import net.rptools.maptool.client.functions.json.JsonArrayFunctions; import net.rptools.maptool.language.I18N; import net.rptools.maptool.util.FunctionUtil; -import net.rptools.parser.MapVariableResolver; import net.rptools.parser.Parser; import net.rptools.parser.ParserException; import net.rptools.parser.VariableResolver;