Index: third_party/hunspell/src/hunspell/affixmgr.cxx |
diff --git a/third_party/hunspell/src/hunspell/affixmgr.cxx b/third_party/hunspell/src/hunspell/affixmgr.cxx |
index c11bdf7d97fb430ec3c4d0c29b837922a7f10e3a..2ece1cd33967c0d77b9277db3d85ecc3a511c971 100644 |
--- a/third_party/hunspell/src/hunspell/affixmgr.cxx |
+++ b/third_party/hunspell/src/hunspell/affixmgr.cxx |
@@ -2126,7 +2126,7 @@ struct hentry* AffixMgr::compound_check(const std::string& word, |
wordnum = oldwordnum2; |
// perhaps second word is a compound word (recursive call) |
- if (wordnum < maxwordnum) { |
+ if (wordnum + 2 < maxwordnum) { |
rv = compound_check(st.substr(i), wordnum + 1, |
numsyllable, maxwordnum, wnum + 1, words, rwords, 0, |
is_sug, info); |
@@ -2699,7 +2699,7 @@ int AffixMgr::compound_check_morph(const char* word, |
wordnum = oldwordnum2; |
// perhaps second word is a compound word (recursive call) |
- if ((wordnum < maxwordnum) && (ok == 0)) { |
+ if ((wordnum + 2 < maxwordnum) && (ok == 0)) { |
compound_check_morph((word + i), strlen(word + i), wordnum + 1, |
numsyllable, maxwordnum, wnum + 1, words, rwords, 0, |
result, &presult); |