diff options
author | 2012-09-06 08:23:43 -0700 | |
---|---|---|
committer | 2012-09-06 08:23:43 -0700 | |
commit | 3f31e96362a38e090a822b36b1de788a1ee04ed2 (patch) | |
tree | 17cce6b77a81e7eb1a1a475607092c7ed384c380 /native/jni/src/unigram_dictionary.cpp | |
parent | 23f8c24d795dec9634c6d2df4c2e7b4d8323d65d (diff) | |
parent | 3518ed6031a1bcb9a501be4b9e1f5b82568185bd (diff) | |
download | latinime-3f31e96362a38e090a822b36b1de788a1ee04ed2.tar.gz latinime-3f31e96362a38e090a822b36b1de788a1ee04ed2.tar.xz latinime-3f31e96362a38e090a822b36b1de788a1ee04ed2.zip |
am 3518ed60: Merge "Fix one-off bugs reported by Valgrind" into jb-mr1-dev
* commit '3518ed6031a1bcb9a501be4b9e1f5b82568185bd':
Fix one-off bugs reported by Valgrind
Diffstat (limited to 'native/jni/src/unigram_dictionary.cpp')
-rw-r--r-- | native/jni/src/unigram_dictionary.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/native/jni/src/unigram_dictionary.cpp b/native/jni/src/unigram_dictionary.cpp index b7e245a6c..cf806c111 100644 --- a/native/jni/src/unigram_dictionary.cpp +++ b/native/jni/src/unigram_dictionary.cpp @@ -451,7 +451,7 @@ int UnigramDictionary::getSubStringSuggestion( const bool hasAutoCorrectionCandidate, const int currentWordIndex, const int inputWordStartPos, const int inputWordLength, const int outputWordStartPos, const bool isSpaceProximity, int *freqArray, - int*wordLengthArray, unsigned short *outputWord, int *outputWordLength) const { + int *wordLengthArray, unsigned short *outputWord, int *outputWordLength) const { if (inputWordLength > MULTIPLE_WORDS_SUGGESTION_MAX_WORD_LENGTH) { return FLAG_MULTIPLE_SUGGEST_ABORT; } @@ -546,9 +546,9 @@ int UnigramDictionary::getSubStringSuggestion( freq = score >> (nextWordLength + TWO_WORDS_PLUS_OTHER_ERROR_CORRECTION_DEMOTION_DIVIDER); } if (DEBUG_DICT) { - AKLOGI("Freq(%d): %d, length: %d, input length: %d, input start: %d (%d)" - , currentWordIndex, freq, nextWordLength, inputWordLength, inputWordStartPos, - wordLengthArray[0]); + AKLOGI("Freq(%d): %d, length: %d, input length: %d, input start: %d (%d)", + currentWordIndex, freq, nextWordLength, inputWordLength, inputWordStartPos, + (currentWordIndex > 0) ? wordLengthArray[0] : 0); } if (freq <= 0 || nextWordLength <= 0 || MAX_WORD_LENGTH <= (outputWordStartPos + nextWordLength)) { |