From 2107d5a041abb644f03557e8c0df4bd5431b5dc3 Mon Sep 17 00:00:00 2001
From: Stefano <stefano.scafiti96@gmail.com>
Date: Wed, 9 Mar 2022 21:10:03 +0100
Subject: [PATCH] Fix loop condition in function splitCommand

---
 client/commands.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/commands.go b/client/commands.go
index 21edcaf..bb7bb59 100644
--- a/client/commands.go
+++ b/client/commands.go
@@ -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++
 		}