Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
thinko on unicode surrogate range
  • Loading branch information
dwarring committed Aug 25, 2013
1 parent 96bacd7 commit 63d7244
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
Expand Up @@ -2753,8 +2753,7 @@ public static String chr(long val, ThreadContext tc) {
|| ((val & 0xfffe) == 0xfffe) // non character
|| val > 0x10ffff) // out of range
)
|| (val >= 0xd800 && val <= 0xdbff) // high surrogate
|| (val >= 0xdc00 && val <= 0xdcff) // low surrogate
|| (val >= 0xd800 && val <= 0xdfff) // surrogate
) {
throw ExceptionHandling.dieInternal(tc, "Invalid code-point U+" + String.format("%05X", val));
}
Expand Down

0 comments on commit 63d7244

Please sign in to comment.