Also limit the number of search terms (as well as their length)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19464
This commit is contained in:
@@ -488,8 +488,8 @@ int EDA_COMBINED_MATCHER::ScoreTerms( std::vector<SEARCH_TERM>& aWeightedTerms )
|
||||
|
||||
// Don't cause KiCad to hang if someone accidentally pastes the PCB or schematic
|
||||
// into the search box.
|
||||
if( term.Text.Length() > 5000 )
|
||||
term.Text = term.Text.Left( 5000 );
|
||||
if( term.Text.Length() > 1000 )
|
||||
term.Text = term.Text.Left( 1000 );
|
||||
|
||||
term.Normalized = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user