From f06a05c0f1981146663db9fc366a0c9fecfb7d36 Mon Sep 17 00:00:00 2001 From: Andy Hefner Date: Sun, 30 Nov 2008 22:26:21 +0000 Subject: [PATCH] Fix bug in stream-write-string on filling-streams which caused an error if the END keyword is nil, observable when climacs attempts to print a lisp arglist (strange this wasn't observed earlier, though). --- text-formatting.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/text-formatting.lisp b/text-formatting.lisp index bb1ed6e..081d02e 100644 --- a/text-formatting.lisp +++ b/text-formatting.lisp @@ -81,8 +81,8 @@ SUPPRESS-SPACE-AFTER-CONJUNCTION are non-standard." (call-next-method)))) (defmethod stream-write-string :around ((stream filling-stream) string - &optional (start 0) (end (length string))) - (dotimes (i (- end start)) + &optional (start 0) end) + (dotimes (i (- (or end (length string)) start)) (stream-write-char stream (aref string (+ i start))))) ;;; All the monkey business with the lambda form has to do with capturing the