From cb2c1d21448717a54d8da67df0bcde31ca6d4eba Mon Sep 17 00:00:00 2001 From: Zwelf Date: Sun, 27 Sep 2020 10:07:26 +0200 Subject: [PATCH] Fix cutting of one character when showing ips in rcon The buffer size passed to `str_append` includes the null terminator. --- src/engine/server/server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index faef2f1eb..240b04462 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -1227,7 +1227,7 @@ void CServer::SendRconLineAuthed(const char *pLine, void *pUser, bool Highlighte else { str_append(aLine, pLine, pStart - pLine + 1); - str_append(aLine, pStart + 2, pStart - pLine + pEnd - pStart - 2); + str_append(aLine, pStart + 2, pStart - pLine + pEnd - pStart - 1); str_append(aLine, pEnd + 2, sizeof(aLine)); str_append(aLineWithoutIps, pLine, pStart - pLine + 1);