Skip to content

Commit 59afb62

Browse files
lafrikslunny
authored andcommitted
Fix Uninitialized variable in ParsePatch (go-gitea#3156) (go-gitea#3162)
1 parent 8a19c6b commit 59afb62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/git_diff.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func ParsePatch(maxLines, maxLineCharacters, maxFiles int, reader io.Reader) (*D
238238
var (
239239
diff = &Diff{Files: make([]*DiffFile, 0)}
240240

241-
curFile *DiffFile
241+
curFile = &DiffFile{}
242242
curSection = &DiffSection{
243243
Lines: make([]*DiffLine, 0, 10),
244244
}

0 commit comments

Comments
 (0)