1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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/trunk@16571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-05-24 13:39:18 +00:00
parent 956dead480
commit 8707a6ff4b
2 changed files with 6 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Sat May 24 22:32:49 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* object.c (rb_cstr_to_dbl): should clear errno before calling
strtod(3). [ruby-dev:34834]
Sat May 24 15:26:16 2008 Yusuke Endoh <mame@tsg.ne.jp>
* compile.c (iseq_set_exception_table, NODE_WHILE, NODE_NEXT): remove

View file

@ -2045,6 +2045,7 @@ rb_cstr_to_dbl(const char *p, int badcheck)
if (!p) return 0.0;
q = p;
while (ISSPACE(*p)) p++;
errno = 0;
d = strtod(p, &end);
if (errno == ERANGE) {
OutOfRange();