Permalink
Browse files

Merge pull request #459 from Pieter12345/master

Fixed ArrayOutOfBoundsEx in the compiler.
  • Loading branch information...
LadyCailin committed Aug 16, 2017
2 parents 575507e + 59e83ba commit f867330785259239112aad2a353e5978f3d06848
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/com/laytonsmith/core/MethodScriptCompiler.java
@@ -1071,7 +1071,7 @@ public static ParseTree compile(List<Token> stream) throws ConfigCompileExceptio
int array = arrayStack.pop().get();
//index is the location of the first node with the index
int index = array + 1;
if (!tree.hasChildren()) {
if (!tree.hasChildren() || array == -1) {
throw new ConfigCompileException("Brackets are illegal here", t.target);
}
ParseTree myArray = tree.getChildAt(array);

0 comments on commit f867330

Please sign in to comment.