diff --git a/rtl/inc/genmath.inc b/rtl/inc/genmath.inc index 6eac64fd77..40d1d4df83 100644 --- a/rtl/inc/genmath.inc +++ b/rtl/inc/genmath.inc @@ -1466,7 +1466,7 @@ type k := 0; if (hx < $00100000) then { x < 2**-1022 } begin - if (((hx and $7fffffff) or lx)=0) then + if (((hx and $7fffffff) or longint(lx))=0) then exit(-two54/zero); { log(+-0)=-inf } if (hx<0) then exit((d-d)/zero); { log(-#) = NaN }