Work around the SANE comp conversion bug in another place.

This affects casts to comp evaluated at compile time, e.g.:

static comp c = (comp)-53019223785472.0;
This commit is contained in:
Stephen Heumann 2022-01-22 18:22:37 -06:00
parent 5357e65859
commit 02fbf97a1e

13
CGI.pas
View File

@ -1413,10 +1413,15 @@ case tp of
d := rval;
rval := d;
end;
cgComp: begin
c := rval;
rval := c;
end;
cgComp: if rval < 0.0 then begin
{work around SANE comp conversion bug}
c := -rval;
rval := -c;
end {if}
else begin
c := rval;
rval := c;
end; {else}
cgExtended: ;
end; {case}
end; {LimitPrecision}