Skip to content
Snippets Groups Projects
Commit 640b26b6 authored by bos's avatar bos
Browse files

Wow, typo(s) of the week! Or do I mean the decade?

This bug has been latent for 6.75 years, and lay dormant all that
time because the Arbitrary instance for Char only generates ASCII.

I just switched the Arbitrary instance for Text to generate a wider
range of Unicode code points, thanks to the quickcheck-unicode
package.  (I'm afraid I don't recall why I didn't do this much
earlier...)
parent 9593095c
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,7 @@ takeWord16 (I16 n) t@(Text arr off len)
| n >= len || m >= len = t
| otherwise = Text arr off m
where
m | w < 0xDB00 || w > 0xD8FF = n
m | w < 0xD800 || w > 0xDBFF = n
| otherwise = n+1
w = A.unsafeIndex arr (off+n-1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment