summaryrefslogtreecommitdiffstats
path: root/labb5
diff options
context:
space:
mode:
Diffstat (limited to 'labb5')
-rwxr-xr-xlabb5/src/Boggle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/labb5/src/Boggle.cpp b/labb5/src/Boggle.cpp
index 96a77b6..5bec889 100755
--- a/labb5/src/Boggle.cpp
+++ b/labb5/src/Boggle.cpp
@@ -116,7 +116,7 @@ bool prefix_matches(const string& prefix, const string& word) {
}
bool Boggle::find_single_word_helper(const string& word, point cur_point, string cur_word, set<point> visited) const {
- if (cur_word == word) {
+ if (cur_word == word && dictionary.contains(cur_word)) {
return true;
}
visited.insert(cur_point);