Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
nqp::iscclass shouldn't throw on bad offset.
  • Loading branch information
jnthn committed Feb 22, 2013
1 parent 909516f commit 0a63679
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/org/perl6/nqp/runtime/Ops.java
Expand Up @@ -1812,6 +1812,8 @@ public static long ordat(String str, long offset) {
};

public static long iscclass(long cclass, String target, long offset) {
if (offset < 0 || offset >= target.length())
return 0;
char test = target.charAt((int)offset);
switch ((int)cclass) {
case CCLASS_ANY:
Expand Down

0 comments on commit 0a63679

Please sign in to comment.