From aea346fbcd79840fd8f47e6a1a0cb59be098b17a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20G=C3=BCldenstein?= <git@lukasgueldenstein.de>
Date: Wed, 11 May 2022 07:57:16 +0200
Subject: [PATCH] Fixes Bug of not identifying characters which are not part of
 the word

---
 src/game.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/game.cpp b/src/game.cpp
index b3ed5a9..38db72d 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -21,7 +21,7 @@ GameState::guess(const std::string &guessedWord) {
   for (std::string::size_type i = 0; i < guessedWord.size(); i++) {
     if (word[i] == guessedWord[i]) {
       matchStatus[i] = EXACT_MATCH;
-    } else if (word.find(guessedWord[i])) {
+    } else if (word.find(guessedWord[i]) != std::string::npos) {
       matchStatus[i] = MATCH;
     } else {
       matchStatus[i] = NO_MATCH;
-- 
GitLab