From b949d2c1f88fddcaced2e2126ebfa41813022f31 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 28 Mar 2017 22:02:22 -0700 Subject: [PATCH] Fix string-for-primitive: it wasn't handling slices. --- 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 8c236b8df..6a235e6b9 100644 --- a/src/runtime/ustring.scm +++ b/src/runtime/ustring.scm @@ -1648,8 +1648,8 @@ USA. %full-string-ref string 0 end) to) (string->utf8 string)))) - (else - (error:not-a string? string 'string-for-primitive)))) + ((slice? string) (string->utf8 string)) + (else (error:not-a string? string 'string-for-primitive)))) (define-integrable (copy-loop to-set! to at from-ref from start end) (do ((i start (fix:+ i 1)) -- 2.25.1