mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 09:39:25 +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,7 +1905,8 @@ VAR S, D: Sw_Integer; Min, Max: TPoint;
|
||||
PROCEDURE GrowI (Var I: Sw_Integer);
|
||||
BEGIN
|
||||
If (GrowMode AND gfGrowRel = 0) Then Inc(I, D)
|
||||
Else I := (I * S + (S - D) SHR 1) DIV (S - D); { Calc grow value }
|
||||
Else If S = D then I := 1
|
||||
Else I := (I * S + (S - D) SHR 1) DIV (S - D); { Calc grow value }
|
||||
END;
|
||||
|
||||
BEGIN
|
||||
|
Loading…
Reference in New Issue
Block a user