aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/util.c b/util.c
index 762d97f0b9..9d10498a66 100644
--- a/util.c
+++ b/util.c
@@ -2143,12 +2143,17 @@ break2:
nd = 0;
c = *s;
- if (c < '0' || '9' < c) goto ret0;
- do {
- nd *= 10;
- nd += c;
- nd -= '0';
- c = *++s;
+ if (c < '0' || '9' < c) goto ret0;
+ do {
+ nd *= 10;
+ nd += c;
+ nd -= '0';
+ c = *++s;
+ /* Float("0x0."+("0"*267)+"1fp2095") */
+ if (abs(nd) > 2095) {
+ while ('0' <= c && c <= '9') c = *++s;
+ break;
+ }
} while ('0' <= c && c <= '9');
dval(rv) = ldexp(adj, nd * dsign);
}