Skip to content

Commit 1bae691

Browse files
authored
fix learnWord for wasm on Firefox and WebKit (#112)
1 parent 12b62cb commit 1bae691

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/libime/pinyin/pinyindictionary.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -923,9 +923,8 @@ PinyinDictionary::lookupWord(size_t idx, std::string_view fullPinyin,
923923
fullPinyin, PinyinFuzzyFlag::VE_UE);
924924
result.push_back(pinyinHanziSep);
925925
result.insert(result.end(), hanzi.begin(), hanzi.end());
926-
auto value = trie(idx)->exactMatchSearch(
927-
std::string_view(result.data(), result.size()));
928-
if (PinyinTrie::isValid(value)) {
926+
auto value = trie(idx)->exactMatchSearchRaw(result.data(), result.size());
927+
if (PinyinTrie::isValidRaw(value)) {
929928
return value;
930929
}
931930
return std::nullopt;

0 commit comments

Comments
 (0)