From: Chris Hanson Date: Sun, 19 Mar 2017 02:47:29 +0000 (-0700) Subject: Fix some bugs in vector->string. X-Git-Tag: mit-scheme-pucked-9.2.12~158^2~85 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6221bdb253d39a31c335046220b105afd33c9cf9;p=mit-scheme.git Fix some bugs in vector->string. --- diff --git a/src/runtime/ustring.scm b/src/runtime/ustring.scm index 1aaac2170..2e08dabf3 100644 --- a/src/runtime/ustring.scm +++ b/src/runtime/ustring.scm @@ -1028,12 +1028,12 @@ USA. ((not (fix:>= i start)) chars)))))) (define (vector->string vector #!optional start end) - (let* ((end (fix:end-index end (vector-length string) 'vector->string)) + (let* ((end (fix:end-index end (vector-length vector) 'vector->string)) (start (fix:start-index start end 'vector->string)) (to (if (do ((i start (fix:+ i 1)) (8-bit? #t (and 8-bit? (char-8-bit? (vector-ref vector i))))) - ((not (fix:< start end)) 8-bit?)) + ((not (fix:< i end)) 8-bit?)) (legacy-string-allocate (fix:- end start)) (full-string-allocate (fix:- end start))))) (copy-loop string-set! to 0