mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-27 08:17:16 +00:00
Need to account for null byte
This commit is contained in:
+1
-1
@@ -859,7 +859,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
|||||||
outapp = new EQApplicationPacket(OP_MOTD);
|
outapp = new EQApplicationPacket(OP_MOTD);
|
||||||
std::string tmp;
|
std::string tmp;
|
||||||
if (database.GetVariable("MOTD", tmp)) {
|
if (database.GetVariable("MOTD", tmp)) {
|
||||||
outapp->size = tmp.length();
|
outapp->size = tmp.length() + 1;
|
||||||
outapp->pBuffer = new uchar[outapp->size];
|
outapp->pBuffer = new uchar[outapp->size];
|
||||||
memset(outapp->pBuffer,0,outapp->size);
|
memset(outapp->pBuffer,0,outapp->size);
|
||||||
strcpy((char*)outapp->pBuffer, tmp.c_str());
|
strcpy((char*)outapp->pBuffer, tmp.c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user