From 1e2136339f42552c3881a639cd432b4c322a5dc3 Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Thu, 17 Jul 2008 01:18:29 +0200 Subject: [PATCH] Fix bug in %WRITE-SIMPLE-ARRAY-UB8. Signed-off-by: Stelian Ionescu --- io.streams/gray/gray-stream-methods.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/io.streams/gray/gray-stream-methods.lisp b/io.streams/gray/gray-stream-methods.lisp index 030e633..33017fc 100644 --- a/io.streams/gray/gray-stream-methods.lisp +++ b/io.streams/gray/gray-stream-methods.lisp @@ -268,10 +268,10 @@ (t (with-pointer-to-vector-data (ptr array) (%flush-obuf write-fn fd ob) - (let ((ret (%write-n-bytes write-fn fd (inc-pointer ptr start) - octets-needed))) - (when (numberp ret) - (incf (iobuf-end ob) octets-needed)))))) + (multiple-value-bind (ok nbytes) + (%write-n-bytes write-fn fd (inc-pointer ptr start) + octets-needed) + (when ok (incf (iobuf-end ob) nbytes)))))) (values array)))) (defun %write-vector-ub8 (stream vector start end) -- 2.11.4.GIT