aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/defines.h
diff options
context:
space:
mode:
authorsatok <satok@google.com>2010-12-06 20:06:03 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-06 20:06:03 -0800
commite00b7c5f7bb4058a67487b6bec664d319cf25f08 (patch)
treecc135ac847c5978458edbea6e58c26dd6ad33c3b /native/src/defines.h
parent292faee8ba73797c8a97052c02f9b571cfb128b3 (diff)
parentf5cded1c6cf0f39df13750d4f9f5ba66c1b32964 (diff)
downloadlatinime-e00b7c5f7bb4058a67487b6bec664d319cf25f08.tar.gz
latinime-e00b7c5f7bb4058a67487b6bec664d319cf25f08.tar.xz
latinime-e00b7c5f7bb4058a67487b6bec664d319cf25f08.zip
Merge "Fix a crash when MAX_WORD_LENGTH is too short."
Diffstat (limited to 'native/src/defines.h')
-rw-r--r--native/src/defines.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/native/src/defines.h b/native/src/defines.h
index 953905fb2..8b817fbc1 100644
--- a/native/src/defines.h
+++ b/native/src/defines.h
@@ -50,8 +50,12 @@
#define SUGGEST_MISSING_CHARACTERS true
#define SUGGEST_MISSING_CHARACTERS_THRESHOLD 5
-#define MAX_WORD_LENGTH_INTERNAL 64
+// This should be greater than or equal to MAX_WORD_LENGTH defined in BinaryDictionary.java
+// This is only used for the size of array. Not to be used in c functions.
+#define MAX_WORD_LENGTH_INTERNAL 48
#define MAX_DEPTH_MULTIPLIER 3
+#define min(a,b) ((a)<(b)?(a):(b))
+
#endif // LATINIME_DEFINES_H