From 971d312256fd1f8e9d9f55a9eb9c1ce9a4bf6e8d Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Thu, 13 Mar 2008 12:57:05 +0000 Subject: [PATCH] Fix off-by-one bug in ~R which prevents printing numbers from 10^63 to 10^66-1. 10^63 is a vigintillion. (From SBCL). --- code/format.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/format.lisp b/code/format.lisp index 77aef41c8..55062ef9f 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.84 2008/03/13 12:25:48 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.85 2008/03/13 12:57:05 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -946,7 +946,7 @@ (defun format-print-cardinal-aux (stream n period err) (multiple-value-bind (beyond here) (truncate n 1000) - (unless (<= period 20) + (unless (<= period 21) (error "Number too large to print in English: ~:D" err)) (unless (zerop beyond) (format-print-cardinal-aux stream beyond (1+ period) err)) -- GitLab