summaryrefslogtreecommitdiff
path: root/Python/strtod.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/strtod.c')
-rw-r--r--Python/strtod.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/strtod.c b/Python/strtod.c
index 6798efa927..ee558982d5 100644
--- a/Python/strtod.c
+++ b/Python/strtod.c
@@ -1,3 +1,6 @@
+#include <stdio.h>
+#include <string.h>
+
#include "pyconfig.h"
/* comp.sources.misc strtod(), as posted in comp.lang.tcl,
@@ -77,7 +80,7 @@ double strtod(char *str, char **ptr)
dp = buffer;
*dp++ = '0'; *dp++ = '.';
buforg = dp, buflim = buffer+48;
- for (save = sp; c = *sp; sp++)
+ for (save = sp; (c = *sp); sp++)
if (c == '.') {
if (dotseen) break;
dotseen++;