mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 18:49:27 +02:00
* avoid div by zero in TView.CalcBounds.GrowI, resolves #30922
git-svn-id: trunk@48115 -
This commit is contained in:
parent
7f775abb6d
commit
964dc6f6f1
@ -1905,6 +1905,7 @@ VAR S, D: Sw_Integer; Min, Max: TPoint;
|
|||||||
PROCEDURE GrowI (Var I: Sw_Integer);
|
PROCEDURE GrowI (Var I: Sw_Integer);
|
||||||
BEGIN
|
BEGIN
|
||||||
If (GrowMode AND gfGrowRel = 0) Then Inc(I, D)
|
If (GrowMode AND gfGrowRel = 0) Then Inc(I, D)
|
||||||
|
Else If S = D then I := 1
|
||||||
Else I := (I * S + (S - D) SHR 1) DIV (S - D); { Calc grow value }
|
Else I := (I * S + (S - D) SHR 1) DIV (S - D); { Calc grow value }
|
||||||
END;
|
END;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user