commit | 02139d74bae1a77bbe4ad528762e1620486e3e36 | [log] [tgz] |
---|---|---|
author | Mark Dickinson <dickinsm@gmail.com> | Wed Jan 13 22:15:53 2010 +0000 |
committer | Mark Dickinson <dickinsm@gmail.com> | Wed Jan 13 22:15:53 2010 +0000 |
tree | 5ea55e9ccf3209147703c1b2cedeeec30480e6a7 | |
parent | 6e0d3d67fb67cc80c4570e504890e03c2bc6efde [diff] [blame] |
Fix buggy comparison: LHS of comparison was being treated as unsigned.
diff --git a/Python/dtoa.c b/Python/dtoa.c index 81221a5..c8985bc 100644 --- a/Python/dtoa.c +++ b/Python/dtoa.c
@@ -1141,7 +1141,7 @@ { U u; - if (bc->scale && 2*P + 1 - ((word0(x) & Exp_mask) >> Exp_shift) > 0) { + if (bc->scale && 2*P + 1 > (int)((word0(x) & Exp_mask) >> Exp_shift)) { /* rv/2^bc->scale is subnormal */ word0(&u) = (P+2)*Exp_msk1; word1(&u) = 0;