From 3fcce2d8a05d45da9b13c85702ec6b9069585214 Mon Sep 17 00:00:00 2001 From: Fredrik de Vibe Date: Fri, 18 Mar 2016 18:13:17 -0400 Subject: Limit number of columns to number of IRC nicks. Don't add more columns to the IRC nicks table than the total number of nicks in the IRC channel. --- matterbridge.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matterbridge.go b/matterbridge.go index 8a0dc766..4ca90dcf 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -83,7 +83,7 @@ func tableformatter (nicks_s string, nicksPerRow int) string { nicksPerRow = 4 } for i := 0; i < 2; i++ { - for j := 1; j <= nicksPerRow; j++ { + for j := 1; j <= nicksPerRow && j <= len(nicks); j++ { if i == 0 { result += "|" } else { -- cgit v1.2.3