From 02f6c0e47ff740a5f6055e96e28ef16c84bf05f6 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Tue, 28 Jun 2022 20:47:38 +0800 Subject: [PATCH] work around to fix too long headword in dsl --- dsl_details.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dsl_details.cc b/dsl_details.cc index 465309ac6..965ce1c6e 100644 --- a/dsl_details.cc +++ b/dsl_details.cc @@ -1151,6 +1151,11 @@ void processUnsortedParts( wstring & str, bool strip ) void expandOptionalParts( wstring & str, list< wstring > * result, size_t x, bool inside_recurse ) { + // if str is too long ,it can never be headwords. + if( str.size() > 100 ) + { + return; + } list< wstring > expanded; list< wstring > * headwords; headwords = inside_recurse ? result : &expanded;