diff options
author | 2011-11-17 11:46:27 -0800 | |
---|---|---|
committer | 2011-11-17 11:46:27 -0800 | |
commit | 0a66397106e57165ec8e27a6f868d275da9f3138 (patch) | |
tree | 3c6634edbdf4cc4af34836b79314a8647adb76e3 /native | |
parent | ac4bd598645ff0f12a59e225122ba5fc87e91e8c (diff) | |
parent | 620b1faf126d4b5f7cb5c353cebd374d1347fdd4 (diff) | |
download | latinime-0a66397106e57165ec8e27a6f868d275da9f3138.tar.gz latinime-0a66397106e57165ec8e27a6f868d275da9f3138.tar.xz latinime-0a66397106e57165ec8e27a6f868d275da9f3138.zip |
am 620b1faf: Merge "Fix the touch calibration bug" into ics-mr1
* commit '620b1faf126d4b5f7cb5c353cebd374d1347fdd4':
Fix the touch calibration bug
Diffstat (limited to 'native')
-rw-r--r-- | native/src/correction.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/native/src/correction.cpp b/native/src/correction.cpp index 8b6d3b23b..22ee75a24 100644 --- a/native/src/correction.cpp +++ b/native/src/correction.cpp @@ -751,6 +751,9 @@ int Correction::RankingAlgorithm::calculateFinalFreq(const int inputIndex, const // \ . // C \ . // 0 R1 R2 + if (factor <= 0) { + return -1; + } multiplyRate((int)(factor * 100), &finalFreq); } else if (squaredDistance == PROXIMITY_CHAR_WITHOUT_DISTANCE_INFO) { multiplyRate(WORDS_WITH_PROXIMITY_CHARACTER_DEMOTION_RATE, &finalFreq); |