From 7f21a9dc757a38d8de02a510b6321ffbfd86e745 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Thu, 31 May 2018 21:12:18 +0200 Subject: [PATCH] Update --- src/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.cpp b/src/client.cpp index ad13441..aede89b 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -139,6 +139,7 @@ long getPosition(std::string str, char c, int occurence) { */ bool connection_handler(const char *preprefix, const char *col1, const char *col2, Socket *socket, long id, long num) { bool error = false; + char buffer[1024]; char *prefix = (char *) preprefix; try { HttpConnection req(socket); @@ -170,7 +171,6 @@ bool connection_handler(const char *preprefix, const char *col1, const char *col sprintf(hostbuffer, "%s", socket->getPeerAddress()->toString().c_str()); } - char buffer[1024]; sprintf(buffer, "[\x1B[1m%s\x1B[0m][%i]%s[%s][%i]%s ", host.c_str(), socket->getSocketPort(), col1, hostbuffer, socket->getPeerPort(), col2);