aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-07-23 17:29:45 +0200
committerGitHub <noreply@github.com>2019-07-23 17:29:45 +0200
commitca00c9c6b84f0b1333e40666ab979d0d8fdc4036 (patch)
treee2c271013af27f5b1e0f1cf4393c0d7c3b1283a1
parent8d05b4792ce8f42509df3fbd64b930e8d8b641f1 (diff)
parentb82ef044521e687044e5e0b2712dbc724dfbd948 (diff)
downloadgit-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.go2
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
}