From 9225de99aca3d50a5d2e7b54d70ee78fe26f239d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 21 May 2020 00:19:01 +0200 Subject: raetselunit.pas: fail early if riddle cannot be filled --- raetselunit.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/raetselunit.pas b/raetselunit.pas index 121a9ea..b78b37b 100644 --- a/raetselunit.pas +++ b/raetselunit.pas @@ -345,8 +345,9 @@ begin if assigned(onSetCaption) then onSetCaption(intToStr(zufallSE.value)); zufallSE.value:=random(zufallSE.maxValue+1); - vorbereiten; - loesen(-1); + repeat + vorbereiten; + until loesen(-1); randErzeugen; leeren; startFelderFestlegen; -- cgit v1.2.3-70-g09d2