From: Chris Hanson Date: Sun, 19 Feb 2017 22:19:42 +0000 (-0800) Subject: Don't throw away string-builder's state when building. X-Git-Tag: mit-scheme-pucked-9.2.12~220^2~57 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=613e7b18630d71c07aad75cfda84031621ba236f;p=mit-scheme.git Don't throw away string-builder's state when building. --- diff --git a/src/runtime/ustring.scm b/src/runtime/ustring.scm index 9b36cef8e..d8a1a125b 100644 --- a/src/runtime/ustring.scm +++ b/src/runtime/ustring.scm @@ -242,10 +242,7 @@ USA. unspecific) (define (build) - (let ((strings (reverse! (cons (string-slice buffer 0 index) buffers)))) - (set! buffer) - (set! buffers) - (set! index) + (let ((strings (reverse (cons (string-slice buffer 0 index) buffers)))) (let ((result (do ((strings strings (cdr strings)) (n 0 (fix:+ n (string-length (car strings))))