Skip to content
Permalink
Browse files

Fix StringIndexOutOfBoundsException in -eval #25

  • Loading branch information...
birchb1024 committed Apr 27, 2019
1 parent 9499615 commit da81b3bffb002d68f84061cf90ad25aee0d64a3d
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/org/genyris/interp/Interpreter.java
@@ -298,9 +298,11 @@ public void debugStackPop(Closure proc) {
}

public Exp evalStringInGlobalEnvironment(String script) throws GenyrisException {
String truncatedScript = script;
if( script.length() > 9 )
truncatedScript = script.substring(0, 10) + "...";
InStream is = new UngettableInStream(new ConvertEofInStream(new IndentStream(
new UngettableInStream(new ReaderInStream(new StringReader(script),
script.substring(0, 10) + "...")), true)));
new UngettableInStream(new ReaderInStream(new StringReader(script), truncatedScript)), true)));

Parser parser = newParser(is);
parser.setUsualPrefixes(this);

0 comments on commit da81b3b

Please sign in to comment.
You can’t perform that action at this time.