summaryrefslogtreecommitdiff
path: root/Python/dtoa.c
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-01-14 13:02:36 +0000
committerMark Dickinson <dickinsm@gmail.com>2010-01-14 13:02:36 +0000
commit68685891033372b4c73f4ec2812fc17d86b34ee1 (patch)
treec0044fc3e4b963489326fbb8beea390722135f99 /Python/dtoa.c
parent6239992405d4bf2e9b6609e6afa4bbf645d9f792 (diff)
downloadcpython-68685891033372b4c73f4ec2812fc17d86b34ee1.tar.gz
Fix off-by-one error introduced in r77483. I have a test for this, but it currently fails due to a different dtoa.c bug; I'll add the test once that bug is fixed.
Diffstat (limited to 'Python/dtoa.c')
-rw-r--r--Python/dtoa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/dtoa.c b/Python/dtoa.c
index 8389eb2352..59833a030c 100644
--- a/Python/dtoa.c
+++ b/Python/dtoa.c
@@ -1303,7 +1303,7 @@ bigcomp(U *rv, const char *s0, BCinfo *bc)
if (dd)
goto ret;
if (!b->x[0] && b->wds == 1) {
- if (i < nd)
+ if (i < nd - 1)
dd = 1;
goto ret;
}
@@ -1319,7 +1319,7 @@ bigcomp(U *rv, const char *s0, BCinfo *bc)
if (dd)
goto ret;
if (!b->x[0] && b->wds == 1) {
- if (i < nd)
+ if (i < nd - 1)
dd = 1;
goto ret;
}