1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-26 09:00:57 +02:00

Fix OutOfBound array access when looking for ReflogCommits

refs #679
This commit is contained in:
Corentin Rossignon 2020-02-26 23:22:25 +01:00 committed by Jesse Duffield
parent 890cc87724
commit bf946200e9

View File

@ -1115,7 +1115,7 @@ func (c *GitCommand) GetReflogCommits() ([]*Commit, error) {
re := regexp.MustCompile(`(\w+).*HEAD@\{\d+\}: (.*)`)
for i, line := range lines {
match := re.FindStringSubmatch(line)
if len(match) == 1 {
if len(match) <= 1 {
continue
}