mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +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);
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user