on master help sign in
Small generator fix for invalid UTF-8
commit6bbed5a749aef912b49ba31d16837b10f49ae906 authorBryan O'Sullivan <bos@serpentine.com> dateMon 30 Dec 2013, 21:03 (13 years ago) parentdc96c0f
1 file changed+1−1
tests/Tests/Properties.hs+1−1
tests/Tests/Properties.hs+1−1
@@ -148,7 +148,7 @@ genInvalidUTF8 = B.pack <$> oneof [
148148 -- invalid leading byte of a 4-byte sequence
149149 , (:) <$> choose (0xF5, 0xFF) <*> upTo 3 contByte
150150 -- 4-byte sequence greater than U+10FFFF
151− , do k <- choose (0x11, 0x1F)
151+ , do k <- choose (0x11, 0x13)
152152 let w0 = 0xF0 + (k `Bits.shiftR` 2)
153153 w1 = 0x80 + ((k .&. 3) `Bits.shiftL` 4)
154154 ([w0,w1]++) <$> vectorOf 2 contByte