From 6221bdb253d39a31c335046220b105afd33c9cf9 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 18 Mar 2017 19:47:29 -0700 Subject: [PATCH] Fix some bugs in vector->string. --- src/runtime/ustring.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.25.1