summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-24 13:33:48 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-24 13:33:48 +0000
commitdb21c058e475d2568287a651ecc25057256b7303 (patch)
tree862af33017c4f69258b6ef4e82a43f3f51fe9ea8 /object.c
parent7c2cfe5784c44c13bc628fd00306fba9598dfd6a (diff)
* object.c (rb_cstr_to_dbl): should clear errno before calling
strtod(3). [ruby-dev:34834] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/object.c b/object.c
index d45934b877..2777843c35 100644
--- a/object.c
+++ b/object.c
@@ -2354,6 +2354,7 @@ rb_cstr_to_dbl(p, badcheck)
else {
while (ISSPACE(*p) || *p == '_') p++;
}
+ errno = 0;
d = strtod(p, &end);
if (errno == ERANGE) {
OutOfRange();