We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 277e165 commit 22ebbd7Copy full SHA for 22ebbd7
src/guesser.cc
@@ -22,7 +22,7 @@ std::vector<int> guesser::guess(std::string in, int count) const {
22
matches.resize(std::min(100ul, matches.size()));
23
24
score_exact_word_matches(in, matches);
25
- matches.resize(count);
+ matches.resize(std::min(static_cast<std::size_t>(count), matches.size()));
26
27
std::vector<int> ret(matches.size());
28
for (int i = 0; i < matches.size(); ++i) {
0 commit comments