From 00f90a1da985e2bc064273c17fcdfb65a8ea4241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Wed, 26 Jun 2024 21:16:02 +0200 Subject: [PATCH] Fixed nested if block in USandSlabs.pas --- solvers/USandSlabs.pas | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/solvers/USandSlabs.pas b/solvers/USandSlabs.pas index ab341f5..649352c 100644 --- a/solvers/USandSlabs.pas +++ b/solvers/USandSlabs.pas @@ -230,13 +230,11 @@ begin end; // Updates disintegration flag. - if ABrick.SupportBricks.Count = 1 then + if (ABrick.SupportBricks.Count = 1) + and ABrick.SupportBricks[0].IsDisintegratable then begin - if ABrick.SupportBricks[0].IsDisintegratable then - begin - ABrick.SupportBricks[0].IsDisintegratable := False; - Dec(FPart1); - end; + ABrick.SupportBricks[0].IsDisintegratable := False; + Dec(FPart1); end; for i := 0 to ABrick.SupportBricks.Count - 1 do ABrick.SupportBricks[i].AddTopBrick(ABrick);