From 8f5a552e7757908944935f699387acfe318c4357 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 465309ac..965ce1c6 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;