summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-05-21 00:19:01 +0200
committerErich Eckner <git@eckner.net>2020-05-21 00:19:01 +0200
commit9225de99aca3d50a5d2e7b54d70ee78fe26f239d (patch)
tree1674f876bc6dec5bb6bb981ff105d8529a3619e5
parentf6b497c56081f0c6c8810e0f03deb8c539192a42 (diff)
downloadRaetsel-9225de99aca3d50a5d2e7b54d70ee78fe26f239d.tar.xz
raetselunit.pas: fail early if riddle cannot be filled
-rw-r--r--raetselunit.pas5
1 files 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;