mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* util.c (ruby_strtod): clear errno at the top of our own
impelementation of strtod(3). [ruby-dev:34834] [ruby-dev:34839] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cf5cf236d7
commit
c2257734e3
3 changed files with 3 additions and 5 deletions
1
object.c
1
object.c
|
@ -2045,7 +2045,6 @@ 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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue