From 4a57326d371e5927229e1c8c67fb65ec7e9e20fa Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Wed, 7 Jan 2009 01:30:16 +0100 Subject: [PATCH] %BUFFER-POSITION: guard against null return values of DEVICE-POSITION. --- io.streams/zeta/buffer.lisp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/io.streams/zeta/buffer.lisp b/io.streams/zeta/buffer.lisp index 903b9c8..e7f1b9b 100644 --- a/io.streams/zeta/buffer.lisp +++ b/io.streams/zeta/buffer.lisp @@ -220,6 +220,8 @@ (defun %buffer-position (buffer) (let ((position (device-position (device-of buffer)))) + (assert (not (null position)) (position) + "A single-channel-buffer's device must not return a NULL device-position.") (ecase (last-io-op-of buffer) (:read (- position (iobuf-available-octets (input-iobuf-of buffer)))) -- 2.11.4.GIT