From 39a14ad5a283388d2583c8d024c75fb73c1e4c55 Mon Sep 17 00:00:00 2001 From: structix Date: Sun, 30 Jun 2019 23:12:57 +0200 Subject: [PATCH] Fixes --- cgi-bin/uebung08/hangman_lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgi-bin/uebung08/hangman_lib.php b/cgi-bin/uebung08/hangman_lib.php index 9dbcdc7..a996130 100644 --- a/cgi-bin/uebung08/hangman_lib.php +++ b/cgi-bin/uebung08/hangman_lib.php @@ -76,7 +76,7 @@ function guessLetter($letter) { $_SESSION['mask'] = $newMask; //if the guessword doesn't contain the letter increment errorCount - if (!$wordcontainsletter) { + if (!$wordcontainsletter && $_SESSION['errorCount'] < 10) { $_SESSION['errorCount'] = $_SESSION['errorCount'] + 1; }