aboutsummaryrefslogtreecommitdiff
path: root/4.2.c
diff options
context:
space:
mode:
Diffstat (limited to '4.2.c')
-rw-r--r--4.2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/4.2.c b/4.2.c
index 5739824..2f797f0 100644
--- a/4.2.c
+++ b/4.2.c
@@ -71,10 +71,10 @@ atof(const char str[])
if (e_sign < 0)
for (j = 0; j < e_power; j++)
- power *= 10;
+ power *= 10.0;
else
for (j = 0; j < e_power; j++)
- power /= 10;
+ power /= 10.0;
return (sign * val / power);
}