Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix nqp::substr; patch from nwc10++.
  • Loading branch information
jnthn committed Feb 4, 2013
1 parent 34bd10f commit 64838dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/org/perl6/nqp/runtime/Ops.java
Expand Up @@ -1466,8 +1466,8 @@ public static String substr3(String val, long offset, long length) {
if (offset >= val.length())
return "";
int end = (int)(offset + length);
if (end >= val.length())
end = val.length() - 1;
if (end > val.length())
end = val.length();
return val.substring((int)offset, end);
}

Expand Down

0 comments on commit 64838dd

Please sign in to comment.