From a61999c0e2bfa97531803baa9924b9043d77b4df Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 13 Jan 2017 00:50:19 -0800 Subject: [PATCH] Fix bug: get-output-bytevector must flush the buffer. Actually this is kind of a bug: output to bytevectors shouldn't be buffered at all. --- src/runtime/binary-port.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runtime/binary-port.scm b/src/runtime/binary-port.scm index f422e9304..01836ffe7 100644 --- a/src/runtime/binary-port.scm +++ b/src/runtime/binary-port.scm @@ -160,6 +160,7 @@ USA. (define (get-output-bytevector port) (guarantee bytevector-output-port? port 'get-output-bytevector) + (flush-binary-output-port port) ((output-sink-custom-ref (buffer-source/sink (port-output-buffer port)) 1))) (define (bytevector-output-port? object) -- 2.25.1