Skip to content

Commit

Permalink
Fix #37
Browse files Browse the repository at this point in the history
  • Loading branch information
forgee committed Dec 29, 2024
1 parent 9d12fdb commit 38497bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ InstantSpell* Spells::getInstantSpell(const std::string& words)
for (auto& it : instants) {
const std::string& instantSpellWords = it.second.getWords();
size_t spellLen = instantSpellWords.length();
if (caseInsensitiveEqual(words, instantSpellWords)) {
if (caseInsensitiveStartsWith(words, instantSpellWords)) {
if (!result || spellLen > result->getWords().size()) {
result = &it.second;
if (words.length() == spellLen) {
Expand Down

0 comments on commit 38497bb

Please sign in to comment.