From 9de5a58695cd86829d3f72f24ca9570a57ba837b Mon Sep 17 00:00:00 2001 From: "mark.dickinson" Date: Sat, 16 Jan 2010 18:06:17 +0000 Subject: [PATCH] Fix multiple uses of variable 'L' in _Py_dg_strtod, where one use requires an unsigned long and the other a signed long. See also r77421. git-svn-id: http://svn.python.org/projects/python/trunk@77533 6015fed2-1504-0410-9fe1-9d1591cc4771 --- Python/dtoa.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Python/dtoa.c b/Python/dtoa.c index aa577f2ec2..9eb8cdba89 100644 --- a/Python/dtoa.c +++ b/Python/dtoa.c @@ -1345,7 +1345,8 @@ _Py_dg_strtod(const char *s00, char **se) const char *s, *s0, *s1; double aadj, aadj1; U aadj2, adj, rv, rv0; - ULong y, z, L; + ULong y, z, abse; + Long L; BCinfo bc; Bigint *bb, *bb1, *bd, *bd0, *bs, *delta; @@ -1425,17 +1426,17 @@ _Py_dg_strtod(const char *s00, char **se) while(c == '0') c = *++s; if (c > '0' && c <= '9') { - L = c - '0'; + abse = c - '0'; s1 = s; while((c = *++s) >= '0' && c <= '9') - L = 10*L + c - '0'; - if (s - s1 > 8 || L > MAX_ABS_EXP) + abse = 10*abse + c - '0'; + if (s - s1 > 8 || abse > MAX_ABS_EXP) /* Avoid confusion from exponents * so large that e might overflow. */ e = (int)MAX_ABS_EXP; /* safe for 16 bit ints */ else - e = (int)L; + e = (int)abse; if (esign) e = -e; } -- 2.11.4.GIT