Skip to content

Commit c46c07d

Browse files
committed
Update simba.vartype_pointarray.pas
1 parent e0c9e7c commit c46c07d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Source/simba.vartype_pointarray.pas

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,8 +1118,7 @@ function TPointArrayHelper.Erode(Iterations: Integer): TPointArray;
11181118
B: TBox;
11191119
begin
11201120
Result := Default(TPointArray);
1121-
Iterations -= 1;
1122-
if (Length(Self) = 0) or (Iterations < 0) then
1121+
if (Length(Self) = 0) or (Iterations = 0) then
11231122
Exit;
11241123

11251124
B := Self.Bounds();
@@ -1173,7 +1172,7 @@ function TPointArrayHelper.Erode(Iterations: Integer): TPointArray;
11731172
end;
11741173
end;
11751174
Inc(J);
1176-
until (J >= Iterations);
1175+
until (J >= Iterations-1);
11771176

11781177
QueueA.Clear();
11791178
for Y := 0 to B.Y2-1 do

0 commit comments

Comments
 (0)