diff options
author | 2014-10-27 15:32:05 +0900 | |
---|---|---|
committer | 2014-10-27 15:32:05 +0900 | |
commit | 3844f74aff2fc0e7ca38f00e9dd7ec6d229880e6 (patch) | |
tree | 6291f89b4a881a785380a7f5b3b29b1b04500f3f /native/jni | |
parent | 23a357d71d5d1a404975375fd376618a4fd2a596 (diff) | |
download | latinime-3844f74aff2fc0e7ca38f00e9dd7ec6d229880e6.tar.gz latinime-3844f74aff2fc0e7ca38f00e9dd7ec6d229880e6.tar.xz latinime-3844f74aff2fc0e7ca38f00e9dd7ec6d229880e6.zip |
Fix: deleted PtNode handling in v403.
If a word is once deleted, the word never gets into the
personalized dictionaries due to this bug.
Change-Id: Ife4e3fe1ba0615b4135e6291d2151b0db7d3f940
Diffstat (limited to 'native/jni')
-rw-r--r-- | native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp b/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp index 249d822b2..d3de322f9 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp @@ -97,6 +97,9 @@ int Ver4PatriciaTriePolicy::getWordId(const CodePointArrayView wordCodePoints, return NOT_A_WORD_ID; } const PtNodeParams ptNodeParams = mNodeReader.fetchPtNodeParamsInBufferFromPtNodePos(ptNodePos); + if (ptNodeParams.isDeleted()) { + return NOT_A_WORD_ID; + } return ptNodeParams.getTerminalId(); } |