Fix char-in-set? so it works with all characters.
authorChris Hanson <org/chris-hanson/cph>
Wed, 8 Mar 2017 04:20:15 +0000 (20:20 -0800)
committerChris Hanson <org/chris-hanson/cph>
Wed, 8 Mar 2017 04:20:15 +0000 (20:20 -0800)
src/runtime/chrset.scm

index c220b34879183b610ecb44af57d6b7761e3b5ec3..eabc1baa06afae885c27ecf08991ebf8faefcd69 100644 (file)
@@ -383,8 +383,9 @@ USA.
 ;;;; Accessors
 
 (define (char-in-set? char char-set)
-  (guarantee bitless-char? char 'char-in-set?)
-  (%code-point-in-char-set? (char->integer char) char-set))
+  (guarantee char? char 'char-in-set?)
+  (and (bitless-char? char)
+       (%code-point-in-char-set? (char->integer char) char-set)))
 
 (define (code-point-in-char-set? cp char-set)
   (guarantee unicode-code-point? cp 'code-point-in-char-set?)