diff --git a/src/client.cpp b/src/client.cpp index ebaf9fe..9c3210f 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -71,6 +71,7 @@ void Client::receiveTask() { publishEvent(ClientEvent::DISCONNECTED, disconnectionMessage); return; } else { + receivedMessage[numOfBytesReceived] = '\0'; publishEvent(ClientEvent::INCOMING_MSG, receivedMessage); } }