From: Chris Hanson Date: Sat, 22 Apr 2017 07:20:30 +0000 (-0700) Subject: Change string-copy to return legacy string only if arg is also legacy. X-Git-Tag: mit-scheme-pucked-9.2.12~158^2~16 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=46e7ae3e97311139c973693e8131d87a7606dcf2;p=mit-scheme.git Change string-copy to return legacy string only if arg is also legacy. --- diff --git a/src/runtime/ustring.scm b/src/runtime/ustring.scm index 4acf9bff8..3607bfd17 100644 --- a/src/runtime/ustring.scm +++ b/src/runtime/ustring.scm @@ -370,8 +370,7 @@ USA. (lambda (string start end) (let* ((n (fix:- end start)) (to - (if (or (fix:= 1 (ustring-cp-size string)) - (fix:< (%general-max-cp string start end) #x100)) + (if (legacy-string? string) (legacy-string-allocate n) (mutable-ustring-allocate n)))) (%general-copy! to 0 string start end)