1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-05-15 20:13:19 +00:00

Fix loop condition in function splitCommand

This commit is contained in:
Stefano 2022-03-09 21:10:03 +01:00
parent b92d052130
commit 2107d5a041

View file

@ -95,7 +95,7 @@ func splitCommand(cmdPrefix string, args []string) []string {
currCmd := cmdPrefix + args[i]
i++
for i < len(args) && len(currCmd) < defaultSplit {
for i < len(args) && len(currCmd)+len(args[i])+1 < defaultSplit {
currCmd += " " + args[i]
i++
}