Revision e0e5c5b6dcf5bb0561a6ec10463386a702ed5390 authored by Jacob Quinn on 02 April 2021, 18:12:56 UTC, committed by Jacob Quinn on 02 April 2021, 18:12:56 UTC
Fixes #40303. When printing values to fixed widths through the `Ryu.writefixed` or `Ryu.writeexp` routines, we have a "cleanup" section after a value has been printed to see if it needs to be rounded given the input precision and width. The core issue was the terminating condition: it previously only checked if we were at the start of a buffer or had encountered the `'-'` character. Via Printf formatting, however, it also allows specifying the `'+'` and `' '` characters to preceed a formatted number. Hence, in the OP, the `'1'` character was getting "rounded" up to the `','` character. The fix here is correctly checking if the `plus` or `space` options were passed to the routine and if so, include those in our rounding termination check. The original issue only reported the "plus" case for the `f` format specifier, but the same bug affects the `e` format specifier and the "space" option.
1 parent 0d9163b
File | Mode | Size |
---|---|---|
.devcontainer | ||
.github | ||
base | ||
cli | ||
contrib | ||
deps | ||
doc | ||
etc | ||
src | ||
stdlib | ||
test | ||
.clang-format | -rw-r--r-- | 3.3 KB |
.gitattributes | -rw-r--r-- | 65 bytes |
.gitignore | -rw-r--r-- | 283 bytes |
.mailmap | -rw-r--r-- | 11.0 KB |
CITATION.bib | -rw-r--r-- | 2.6 KB |
CONTRIBUTING.md | -rw-r--r-- | 19.7 KB |
HISTORY.md | -rw-r--r-- | 313.4 KB |
LICENSE.md | -rw-r--r-- | 5.0 KB |
Make.inc | -rw-r--r-- | 48.0 KB |
Makefile | -rw-r--r-- | 25.4 KB |
NEWS.md | -rw-r--r-- | 4.2 KB |
README.md | -rw-r--r-- | 6.8 KB |
VERSION | -rw-r--r-- | 10 bytes |
sysimage.mk | -rw-r--r-- | 3.9 KB |
Computing file changes ...