diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2008-07-16 09:40:03 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2008-07-16 09:40:03 (GMT) |
commit | 64b7e501f46938a15e6ee2eaaaf6fc2b56e4abd8 (patch) | |
tree | e810977e3edfea7d4205cc21145353cc258a5a33 /Python | |
parent | c83f113c8a8c7436abede6a2f19722bc81824146 (diff) | |
download | cpython-64b7e501f46938a15e6ee2eaaaf6fc2b56e4abd8.zip cpython-64b7e501f46938a15e6ee2eaaaf6fc2b56e4abd8.tar.gz cpython-64b7e501f46938a15e6ee2eaaaf6fc2b56e4abd8.tar.bz2 |
Issue #3360: Fix incorrect parsing of "020000000000.0".
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ast.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Python/ast.c b/Python/ast.c index dc22478..b6a5e0f 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -3139,16 +3139,7 @@ parsenumber(struct compiling *c, const char *s) #endif if (*end == 'l' || *end == 'L') return PyLong_FromString((char *)s, (char **)0, 0); - if (s[0] == '0') { - x = (long) PyOS_strtoul((char *)s, (char **)&end, 0); - if (x < 0 && errno == 0) { - return PyLong_FromString((char *)s, - (char **)0, - 0); - } - } - else - x = PyOS_strtol((char *)s, (char **)&end, 0); + x = PyOS_strtol((char *)s, (char **)&end, 0); if (*end == '\0') { if (errno != 0) return PyLong_FromString((char *)s, (char **)0, 0); |