diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2139,11 +2139,15 @@ break2: if (abs(dsign) == 1) s++; else dsign = 1; - for (nd = 0; (c = *s) >= '0' && c <= '9'; s++) { + nd = 0; + c = *s; + if (c < '0' || '9' < c) goto ret0; + do { nd *= 10; nd += c; nd -= '0'; - } + c = *++s; + } while ('0' <= c && c <= '9'); dval(rv) = ldexp(adj, nd * dsign); } else { |