From 034728a53793699d4950fcc9d9bbc0e65debb4ac Mon Sep 17 00:00:00 2001
From: toy <toy>
Date: Thu, 7 Mar 2002 16:44:21 +0000
Subject: [PATCH] ~,1,6,$ was printing out too many pad (space) characters
 because we miscomputed how many pad characters were needed.

(Bug noted by Robert Strandh.)
---
 code/format.lisp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/code/format.lisp b/code/format.lisp
index 6dc8d6828..32ea6b071 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.42 2001/06/17 19:10:25 pw Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.43 2002/03/07 16:44:21 toy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1286,7 +1286,7 @@
 			     (lisp::flonum-to-string number nil d nil)
 	  (declare (ignore ig2 ig3))
 	  (when colon (write-string signstr stream))
-	  (dotimes (i (- w signlen (- n pointplace) strlen))
+	  (dotimes (i (- w signlen (max 0 (- n pointplace)) strlen))
 	    (write-char pad stream))
 	  (unless colon (write-string signstr stream))
 	  (dotimes (i (- n pointplace)) (write-char #\0 stream))
-- 
GitLab