mirror of
https://github.com/python/cpython.git
synced 2025-07-19 09:15:34 +00:00
Merged revisions 65125 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r65125 | eric.smith | 2008-07-18 20:24:05 -0400 (Fri, 18 Jul 2008) | 1 line Fix issue 3411: default float format spec fails on negative numbers. ........
This commit is contained in:
parent
32480b0755
commit
2ad79e82c8
2 changed files with 10 additions and 0 deletions
|
@ -302,6 +302,10 @@ ensure_decimal_point(char* buffer, size_t buf_size)
|
|||
|
||||
/* search for the first non-digit character */
|
||||
char *p = buffer;
|
||||
if (*p == '-' || *p == '+')
|
||||
/* Skip leading sign, if present. I think this could only
|
||||
ever be '-', but it can't hurt to check for both. */
|
||||
++p;
|
||||
while (*p && isdigit(Py_CHARMASK(*p)))
|
||||
++p;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue