am 620b1faf: Merge "Fix the touch calibration bug" into ics-mr1
* commit '620b1faf126d4b5f7cb5c353cebd374d1347fdd4':
Fix the touch calibration bug
diff --git a/native/src/correction.cpp b/native/src/correction.cpp
index 0c56680..27dc407 100644
--- a/native/src/correction.cpp
+++ b/native/src/correction.cpp
@@ -758,6 +758,9 @@
// \ .
// 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);