Skip to content

Commit

Permalink
Fix Uninitialized variable in ParsePatch (go-gitea#3156)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkcsoft authored and lafriks committed Dec 12, 2017
1 parent 3b525d5 commit 4b5197b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/git_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func ParsePatch(maxLines, maxLineCharacters, maxFiles int, reader io.Reader) (*D
var (
diff = &Diff{Files: make([]*DiffFile, 0)}

curFile *DiffFile
curFile = &DiffFile{}
curSection = &DiffSection{
Lines: make([]*DiffLine, 0, 10),
}
Expand Down

0 comments on commit 4b5197b

Please sign in to comment.