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; d := rval;
rval := d; rval := d;
end; end;
cgComp: begin cgComp: if rval < 0.0 then begin
c := rval; {work around SANE comp conversion bug}
rval := c; c := -rval;
end; rval := -c;
end {if}
else begin
c := rval;
rval := c;
end; {else}
cgExtended: ; cgExtended: ;
end; {case} end; {case}
end; {LimitPrecision} end; {LimitPrecision}