changeset 9775:5dc05fdcf3c2

Fix SourceSection.getCode.
author Chris Seaton <chris.seaton@oracle.com>
date Mon, 20 May 2013 23:22:36 -0700
parents 20963f52fdd5
children f43313f3f759 26785bb7006d
files graal/com.oracle.truffle.api/src/com/oracle/truffle/api/SourceSection.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/SourceSection.java	Fri May 17 22:45:55 2013 +0200
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/SourceSection.java	Mon May 20 23:22:36 2013 -0700
@@ -115,7 +115,7 @@
      * @return the code as a String object
      */
     public final String getCode() {
-        return getSource().getCode().substring(charIndex, charLength);
+        return getSource().getCode().substring(charIndex, charIndex + charLength);
     }
 
     @Override