Skip to content

Commit

Permalink
Check correct label in scriptas() when none is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed Oct 18, 2017
1 parent 9f2b7c8 commit b21a10d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/laytonsmith/core/functions/Meta.java
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,10 @@ public Construct execs(Target t, Environment environment, Script parent, ParseTr
String originalLabel = environment.getEnv(GlobalEnv.class).GetLabel();
if (nodes.length == 3) {
offset++;
String label = environment.getEnv(GlobalEnv.class).GetScript().seval(nodes[1], environment).val();
String label = parent.seval(nodes[1], environment).val();
environment.getEnv(GlobalEnv.class).SetLabel(label);
} else {
environment.getEnv(GlobalEnv.class).SetLabel(parent.getLabel());
}
environment.getEnv(CommandHelperEnvironment.class).SetPlayer(p);
parent.enforceLabelPermissions();
Expand Down

0 comments on commit b21a10d

Please sign in to comment.