From ab396e07cc7c6aff0723d406f3037b24645b6049 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Wed, 16 Jul 2008 11:04:17 +0000 Subject: Issue #3360: Fix incorrect parsing of '020000000000.0'. This is a backport of r65005. --- Python/ast.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'Python/ast.c') diff --git a/Python/ast.c b/Python/ast.c index 057b64df32..434236b307 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -3067,16 +3067,7 @@ parsenumber(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); -- cgit v1.2.1