aboutsummaryrefslogtreecommitdiff
path: root/hotline
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2023-11-20 13:34:51 -0800
committerGitHub <noreply@github.com>2023-11-20 13:34:51 -0800
commit6e4c02b1b9793776a52cf8b1f914eeadd2bbb4b5 (patch)
treee15d4e3bafdc73b1f1cc0f1a2ff29e52fb264f47 /hotline
parentc2f62e9d34248432ee31144378ba9c6900ac974a (diff)
Fix bug in client tracker list (#106)
This fixes an issue where the client would connect to the incorrect server when joining from the tracker listing.
Diffstat (limited to 'hotline')
-rw-r--r--hotline/ui.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/hotline/ui.go b/hotline/ui.go
index e3e2fab..c5a0dbd 100644
--- a/hotline/ui.go
+++ b/hotline/ui.go
@@ -113,7 +113,8 @@ func (ui *UI) getTrackerList(servers []ServerRecord) *tview.List {
list.Box.SetBorder(true).SetTitle("| Servers |")
const shortcut = 97 // rune for "a"
- for i, srv := range servers {
+ for i, _ := range servers {
+ srv := servers[i]
list.AddItem(string(srv.Name), string(srv.Description), rune(shortcut+i), func() {
ui.Pages.RemovePage("joinServer")