From: ceriel Date: Wed, 10 Aug 1988 15:54:15 +0000 (+0000) Subject: prevent overflow X-Git-Tag: release-5-5~2935 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=094d42726830d4dbb2660708007e7caca818a51e;p=ack.git prevent overflow --- diff --git a/lang/cem/libcc/gen/atof.c b/lang/cem/libcc/gen/atof.c index 8c2c3029a..256db5e85 100644 --- a/lang/cem/libcc/gen/atof.c +++ b/lang/cem/libcc/gen/atof.c @@ -68,7 +68,7 @@ atof(p) while (exp) { if (exp % 2) correction *= exp5; exp /= 2; - exp5 *= exp5; + if (exp != 0) exp5 *= exp5; } if (expsign) fl = fl / correction; else fl = fl * correction;