From 1fb7a860a14d76eed5c03f8a222157d998d2aed8 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Sat, 5 Oct 2024 08:58:22 -0400 Subject: [PATCH] [Bug Fix] Fix #set motd Crash (#4495) --- zone/gm_commands/set/motd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/gm_commands/set/motd.cpp b/zone/gm_commands/set/motd.cpp index 51ec7ca98..8d188ab48 100755 --- a/zone/gm_commands/set/motd.cpp +++ b/zone/gm_commands/set/motd.cpp @@ -17,7 +17,7 @@ void SetMOTD(Client *c, const Seperator *sep) auto m = (ServerMotd_Struct *) pack->pBuffer; strn0cpy(m->myname, c->GetName(), sizeof(m->myname)); - strn0cpy(m->motd, message.c_str(), sizeof(m->motd)); + strn0cpy(m->motd, !message.empty() ? message.c_str() : "", sizeof(m->motd)); worldserver.SendPacket(pack); safe_delete(pack);