mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 22:01:36 -08:00
format: floats: Fix non-conformity bug regarding output characters.
When width is supplied to format, CLHS 22.3.3.1 Says "Exactly w
characters will be output." This patch fixes this non-conformity to
count separator (".") as well.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
This commit is contained in:
parent
5536f98294
commit
612b6bb64b
1 changed files with 1 additions and 1 deletions
|
|
@ -1337,7 +1337,7 @@
|
|||
(when (and w (or atsign (minusp number))) (decf spaceleft))
|
||||
(multiple-value-bind
|
||||
(str len lpoint tpoint)
|
||||
(sys::flonum-to-string (abs number) spaceleft d k)
|
||||
(sys::flonum-to-string (abs number) (1- spaceleft) d k)
|
||||
;;if caller specifically requested no fraction digits, suppress the
|
||||
;;optional trailing zero
|
||||
(when (and d (zerop d)) (setq tpoint nil))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue