From e2649952c7b64ddf815275ab3ae1309ff38e5d54 Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Wed, 12 Feb 1992 16:11:24 +0000
Subject: [PATCH] Changed FLONUM-TO-STRING to consider widths < 1 to be 1 to
 prevent infinite looping in those cases.

---
 code/print.lisp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/code/print.lisp b/code/print.lisp
index c3da19b73..8705cc5e7 100644
--- a/code/print.lisp
+++ b/code/print.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/print.lisp,v 1.35 1992/02/11 16:56:30 ram Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/print.lisp,v 1.36 1992/02/12 16:11:24 ram Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1356,7 +1356,8 @@
 			      (integer-decode-float x)
 	   (let* ((precision (float-precision x))
 		  (digits (float-digits x))
-		  (fudge (- digits precision)))
+		  (fudge (- digits precision))
+		  (width (if width (max width 1) nil)))
 	   (float-string (ash sig (- fudge)) (+ exp fudge) precision width
 			 fdigits scale fmin))))))
 
-- 
GitLab