Skip to content

Commit

Permalink
fix index out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
zu1k committed Aug 15, 2020
1 parent 996c1d7 commit 95fa5a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func CrawlGo() {
log.Println("CrawlGo clash useable node count:", len(proxies))

num := len(proxies)
for i := 1; i <= num; i++ {
proxies[i].SetName("tgbot.co_" + strconv.Itoa(i))
for i := 0; i < num; i++ {
proxies[i].SetName("tgbot.co_" + strconv.Itoa(i+1))
}
cache.SetProxies(proxies)
cache.SetString("clashproxies", provider.Clash{Proxies: proxies}.Provide())
Expand Down

0 comments on commit 95fa5a7

Please sign in to comment.