diff --git a/code/format.lisp b/code/format.lisp
index 6c868c9b448540f155dff1657168b9ae559688e8..7dc8887f4c3673b0af337951366c97177174be35 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.68 2006/04/28 20:58:43 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.69 2006/05/01 16:10:26 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1257,7 +1257,16 @@
 			       (if atsign (write-char #\+ stream)))
 			   (when lpoint (write-char #\0 stream))
 			   (write-string fstr stream)
-			   (when add-zero-p
+			   ;; Add a zero if we need it.  Which means
+			   ;; we figured out we need one above, or
+			   ;; another condition.  Basically, append a
+			   ;; zero if there are no width constraints
+			   ;; and if the last char to print was a
+			   ;; decimal (so the trailing fraction is
+			   ;; zero.)
+			   (when (or add-zero-p
+				     (and (null w)
+					  (char= (aref fstr (1- flen)) #\.)))
 			     ;; It's later and we're adding the zero
 			     ;; digit.
 			     (write-char #\0 stream))
diff --git a/code/print.lisp b/code/print.lisp
index 6bc6a92329dd1e3c06a006364c3c1974dccdf418..b993f158f338674b039ea79495eca228d9940f2f 100644
--- a/code/print.lisp
+++ b/code/print.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/print.lisp,v 1.109 2006/04/28 20:51:42 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/print.lisp,v 1.110 2006/05/01 16:10:26 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1539,7 +1539,13 @@ radix-R.  If you have a power-list then pass it in as PL."
 		   (write-string "." stream)
 		   (dotimes (i (- e))
 		     (write-char #\0 stream))
-		   (write-string string stream)
+		   ;; If we're out of room (because fdigits is too
+		   ;; small), don't print out our string.  This fixes
+		   ;; things like (format nil "~,2f" 0.001).  We should
+		   ;; print ".00", not ".001".
+		   (when (or (null fdigits)
+			     (plusp (+ e fdigits)))
+		     (write-string string stream))
 		   (when fdigits
 		     (dotimes (i (+ fdigits e (- (length string))))
 		       (write-char #\0 stream)))))