AggPasMod icon indicating copy to clipboard operation
AggPasMod copied to clipboard

Integer overflow in unit AggSpanGradient function TAggGradientRadialFocus.Calculate

Open BVerhue opened this issue 5 years ago • 1 comments

I got a integer overflow on line 446

CurToFocus := Sqr(X - FFocus.X) + Sqr(Y - FFocus.Y);

Solved it by changing it to

CurToFocus := Sqr(1.0 * X - FFocus.X) + Sqr(1.0 * Y - FFocus.Y);

BVerhue avatar Feb 25 '20 06:02 BVerhue

I'm not really happy with the workaround as I don't know about the implications on the CPU level. I have to check this by myself. Can you recommend any example that runs directly into this issue?

CWBudde avatar Apr 10 '20 22:04 CWBudde