From e91dc18999ab3911cc8f2ef6720e175142e87145 Mon Sep 17 00:00:00 2001
From: pw <pw>
Date: Sun, 17 Jun 2001 19:10:25 +0000
Subject: [PATCH] From Eric Marsden:

    Problem: (format t "~f" "foo") => Error "Argument y is not a real:
    nil". CLHS says "If arg is a complex number or some non-numeric
    object, then it is printed using the format directive ~wD, thereby
    printing it in decimal radix and a minimum field width of w".
---
 code/format.lisp | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/code/format.lisp b/code/format.lisp
index c199f2e20..6dc8d6828 100644
--- a/code/format.lisp
+++ b/code/format.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.41 1999/04/12 12:39:26 dtc Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.42 2001/06/17 19:10:25 pw Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -602,10 +602,11 @@
     (write-string string stream))
   (dotimes (i minpad)
     (write-char padchar stream))
-  (do ((chars (+ (length string) minpad) (+ chars colinc)))
-      ((>= chars mincol))
-    (dotimes (i colinc)
-      (write-char padchar stream)))
+  (and mincol minpad colinc
+       (do ((chars (+ (length string) minpad) (+ chars colinc)))
+	   ((>= chars mincol))
+	 (dotimes (i colinc)
+	   (write-char padchar stream))))
   (when padleft
     (write-string string stream)))
 
-- 
GitLab