mirror of
				https://github.com/notepad-plus-plus/notepad-plus-plus.git
				synced 2025-11-03 21:14:08 +01:00 
			
		
		
		
	Fix a crash in UDL
Fix infinite loop while lexing UDL multi-part keyword in prefix mode. Fix #11434, close #11543
This commit is contained in:
		
							parent
							
								
									b57254aece
								
							
						
					
					
						commit
						3f322faf62
					
				@ -1061,9 +1061,10 @@ static bool isInListBackward(WordList & list, StyleContext & sc, bool specialMod
 | 
				
			|||||||
                            }
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            // skip next "word" (if next word is not found, go back to end of multi-part keyword)
 | 
					                            // skip next "word" (if next word is not found, go back to end of multi-part keyword)
 | 
				
			||||||
                            // it is not necessary to check EOF position here, because sc.GetRelative returns ' ' beyond EOF
 | 
					                            // it is not necessary to check EOF position here, because sc.GetRelative returns '\0' beyond EOF by default
 | 
				
			||||||
 | 
					                            // return ' ' on EOF instead to not loop indefinitely
 | 
				
			||||||
                            bool nextWordFound = false;
 | 
					                            bool nextWordFound = false;
 | 
				
			||||||
                            while (!isWhiteSpace2(sc.GetRelative(indexb + offset), nlCountTemp, wsChar, sc.GetRelative(offset + indexb + 1)))
 | 
					                            while (!isWhiteSpace2(sc.GetRelative(indexb + offset, ' '), nlCountTemp, wsChar, sc.GetRelative(offset + indexb + 1, ' ')))
 | 
				
			||||||
                            {
 | 
					                            {
 | 
				
			||||||
                                if (isInListForward2(fwEndVectors, FW_VECTORS_TOTAL, sc, ignoreCase, indexb + offset))
 | 
					                                if (isInListForward2(fwEndVectors, FW_VECTORS_TOTAL, sc, ignoreCase, indexb + offset))
 | 
				
			||||||
                                {
 | 
					                                {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user