From de48d79b273195db5b837ccda518bc1ef18105a7 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 9 May 2016 21:46:05 -0400 Subject: [PATCH] Need to account for null byte --- world/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/world/client.cpp b/world/client.cpp index 6250fb0b9..696da355b 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -859,7 +859,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { outapp = new EQApplicationPacket(OP_MOTD); std::string tmp; if (database.GetVariable("MOTD", tmp)) { - outapp->size = tmp.length(); + outapp->size = tmp.length() + 1; outapp->pBuffer = new uchar[outapp->size]; memset(outapp->pBuffer,0,outapp->size); strcpy((char*)outapp->pBuffer, tmp.c_str());