mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Fix Uninitialized variable in ParsePatch (#3156)
This commit is contained in:
		
				
					committed by
					
						
						Lauris BH
					
				
			
			
				
	
			
			
			
						parent
						
							3b525d5696
						
					
				
				
					commit
					4b5197beb4
				
			@@ -238,7 +238,7 @@ func ParsePatch(maxLines, maxLineCharacters, maxFiles int, reader io.Reader) (*D
 | 
				
			|||||||
	var (
 | 
						var (
 | 
				
			||||||
		diff = &Diff{Files: make([]*DiffFile, 0)}
 | 
							diff = &Diff{Files: make([]*DiffFile, 0)}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		curFile    *DiffFile
 | 
							curFile    = &DiffFile{}
 | 
				
			||||||
		curSection = &DiffSection{
 | 
							curSection = &DiffSection{
 | 
				
			||||||
			Lines: make([]*DiffLine, 0, 10),
 | 
								Lines: make([]*DiffLine, 0, 10),
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user