diff options
author | 2011-11-16 23:25:13 -0800 | |
---|---|---|
committer | 2011-11-16 23:25:13 -0800 | |
commit | b39355e1972b08cae42977d0251690dab5fcc813 (patch) | |
tree | ec5498766b06f85ea2885ea29dd31fea02c7bbd1 | |
parent | 81632b74387855f4a23b50c6e5e48ee016e3759a (diff) | |
parent | 620b1faf126d4b5f7cb5c353cebd374d1347fdd4 (diff) | |
download | latinime-b39355e1972b08cae42977d0251690dab5fcc813.tar.gz latinime-b39355e1972b08cae42977d0251690dab5fcc813.tar.xz latinime-b39355e1972b08cae42977d0251690dab5fcc813.zip |
am 620b1faf: Merge "Fix the touch calibration bug" into ics-mr1
* commit '620b1faf126d4b5f7cb5c353cebd374d1347fdd4':
Fix the touch calibration bug
-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 0c566802c..27dc40745 100644 --- a/native/src/correction.cpp +++ b/native/src/correction.cpp @@ -758,6 +758,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); |