diff options
author | Michael Muré <batolettre@gmail.com> | 2019-07-23 17:29:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 17:29:45 +0200 |
commit | ca00c9c6b84f0b1333e40666ab979d0d8fdc4036 (patch) | |
tree | e2c271013af27f5b1e0f1cf4393c0d7c3b1283a1 | |
parent | 8d05b4792ce8f42509df3fbd64b930e8d8b641f1 (diff) | |
parent | b82ef044521e687044e5e0b2712dbc724dfbd948 (diff) | |
download | git-bug-ca00c9c6b84f0b1333e40666ab979d0d8fdc4036.tar.gz |
Merge pull request #184 from A-Hilaly/bridge-github-fix
fix index out of range panic in github configuration
-rw-r--r-- | bridge/github/config.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bridge/github/config.go b/bridge/github/config.go index 5aced56f..45c078f6 100644 --- a/bridge/github/config.go +++ b/bridge/github/config.go @@ -379,7 +379,7 @@ func promptURL(remotes map[string]string) (string, string, error) { line = strings.TrimRight(line, "\n") index, err := strconv.Atoi(line) - if err != nil || (index < 0 && index >= len(validRemotes)) { + if err != nil || index < 0 || index > len(validRemotes) { fmt.Println("invalid input") continue } |