From f3d4fc80aeb9e9394f6bf1f933207bbf18cb7fef Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 13 Oct 2004 04:49:53 +0000 Subject: [PATCH] WIDE-STRING->STRING should signal an error if a character in the source doesn't satisfy CHAR-ASCII?. --- v7/src/runtime/unicode.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/v7/src/runtime/unicode.scm b/v7/src/runtime/unicode.scm index 91c022a5d..b1f31791b 100644 --- a/v7/src/runtime/unicode.scm +++ b/v7/src/runtime/unicode.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: unicode.scm,v 1.18 2004/05/27 14:03:06 cph Exp $ +$Id: unicode.scm,v 1.19 2004/10/13 04:49:53 cph Exp $ Copyright 2001,2003,2004 Massachusetts Institute of Technology @@ -661,7 +661,9 @@ USA. (do ((i start (fix:+ i 1)) (j 0 (fix:+ j 1))) ((not (fix:< i end))) - (string-set! s j (vector-ref v i))) + (if (fix:< (char->integer (vector-ref v i)) #x100) + (string-set! s j (vector-ref v i)) + (error:bad-range-argument string 'WIDE-STRING->STRING))) s)) ;;;; UTF-32 representation -- 2.25.1