mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 01:58:54 +01:00 
			
		
		
		
	glib-mkenums: Don't go into an infinite loop trying to find a matching {
If we reach EOF before this happens, error out as opposed to looping around forever. https://bugzilla.gnome.org/show_bug.cgi?id=794506
This commit is contained in:
		
				
					committed by
					
						
						Philip Withnall
					
				
			
			
				
	
			
			
			
						parent
						
							145e45f55d
						
					
				
				
					commit
					3c5e8a65fd
				
			@@ -495,6 +495,8 @@ def process_file(curfilename):
 | 
			
		||||
            if groups[0] is None and (len(groups) < 4 or groups[3] is None):
 | 
			
		||||
                while True:
 | 
			
		||||
                    line = curfile.readline()
 | 
			
		||||
                    if not line:
 | 
			
		||||
                        print_error("Syntax error when looking for opening { in enum")
 | 
			
		||||
                    if re.match(r'\s*\{', line):
 | 
			
		||||
                        break
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user