Skip to content

Commit d59efc1

Browse files
author
G_Moris
committed
Fix crash
1 parent 79b76ef commit d59efc1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Client/core/CCommands.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ bool CCommands::Execute(const char* szCommand, const char* szParametersIn, bool
8686
// Copy szParametersIn so the contents can be changed
8787
char* szParameters = nullptr;
8888
if (szParametersIn)
89+
{
90+
szParameters = static_cast<char*>(alloca(strlen(szParametersIn) + 1));
8991
std::strcpy(szParameters, szParametersIn);
92+
}
9093

9194
// HACK: if its a 'chatboxsay' command, use the next parameter
9295
// Is the command "say" and the arguments start with /? (command comes from the chatbox)

0 commit comments

Comments
 (0)