don't allocate 2 extra bytes in DoSayPacketFromCommand

This commit is contained in:
Skirlez 2026-02-23 22:24:09 +02:00 committed by NepDisk
parent 06245c7ecc
commit 4c5ed80162

View file

@ -6908,10 +6908,9 @@ void DoSayPacket(SINT8 target, UINT8 flags, UINT8 source, char *message)
void DoSayPacketFromCommand(SINT8 target, size_t usedargs, UINT8 flags)
{
char buf[2 + HU_MAXMSGLEN + 1];
char msg[HU_MAXMSGLEN + 1];
size_t numwords, ix;
char *msg = &buf[2];
const size_t msgspace = sizeof buf - 2;
const size_t msgspace = sizeof msg;
numwords = COM_Argc() - usedargs;
I_Assert(numwords > 0);