diff --git a/node.c b/node.c index a5e06cd..113cc38 100644 --- a/node.c +++ b/node.c @@ -143,6 +143,12 @@ finish: n->flags |= NUMCUR; } else { errno = 0; + /* + * N.B. For subnormal values, strtod may return the + * floating-point representation while setting errno to ERANGE. + * We force the numeric value to 0 in such cases. + */ + n->numbr = 0; } return n;