Browse Source

Fix Uninitialized variable in ParsePatch (#3156)

tags/v1.21.12.1
Kim "BKC" Carlbäcker Lauris BH 8 years ago
parent
commit
4b5197beb4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      models/git_diff.go

+ 1
- 1
models/git_diff.go View File

@@ -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),
}


Loading…
Cancel
Save