aboutsummaryrefslogtreecommitdiffstats
path: root/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'node.c')
-rw-r--r--node.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/node.c b/node.c
index fcd2bf33..984cec81 100644
--- a/node.c
+++ b/node.c
@@ -140,7 +140,8 @@ r_force_number(NODE *n)
*cpend = save;
}
- if (errno == 0) {
+ if (errno == 0 || errno == ERANGE) {
+ errno = 0; /* reset in case of ERANGE */
if (ptr == cpend)
goto goodnum;
/* else keep the leading numeric value without updating flags */