summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--util.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 87774c7b89..563da96328 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jul 11 16:09:09 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * util.c (ruby_strtod): exp should be less than MDMAXEXPT.
+
Thu Jul 10 14:42:02 2003 WATANABE Hirofumi <eban@ruby-lang.org>
* math.c (math_log): nan takes a dummy argument on Cygwin 1.5.0.
diff --git a/util.c b/util.c
index ae2bc8de92..9b058e6114 100644
--- a/util.c
+++ b/util.c
@@ -859,7 +859,7 @@ ruby_strtod(string, endPtr)
* fraction.
*/
- if (exp > MDMAXEXPT - 18) {
+ if (exp >= MDMAXEXPT - 18) {
exp = MDMAXEXPT;
errno = ERANGE;
}