Fix bug: ranges aren't necessarily code points.
authorChris Hanson <org/chris-hanson/cph>
Tue, 31 Jan 2017 03:15:43 +0000 (19:15 -0800)
committerChris Hanson <org/chris-hanson/cph>
Tue, 31 Jan 2017 03:15:43 +0000 (19:15 -0800)
src/runtime/chrset.scm

index 22053ee4c73dcf7bf3fcffea1e44eb70f66a3a79..d03aedc0f79c809af16b9fe8df86b4a150c98a88 100644 (file)
@@ -102,8 +102,9 @@ USA.
 
 (define (%range? object)
   (or (and (pair? object)
-          (unicode-code-point? (car object))
-          (unicode-code-point? (cdr object))
+          (index-fixnum? (car object))
+          (index-fixnum? (cdr object))
+           (fix:<= (cdr object) char-code-limit)
           (fix:<= (car object) (cdr object)))
       (unicode-code-point? object)))