File tree Expand file tree Collapse file tree
src/core/modules/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,7 +227,9 @@ void SayConCommand::Dispatch( const CCommand& command )
227227 // Create a new CCommand object that does not contain the first argument
228228 // (say or say_team) and is properly splitted
229229 CCommand stripped_command = CCommand ();
230- char * szCommand = (char *) command.ArgS ();
230+ char szTempCommand[512 ];
231+ strcpy (szTempCommand, command.ArgS ());
232+ char * szCommand = szTempCommand;
231233
232234 // Remove quotes (if existant), so the arguments are not recognized as a
233235 // single argument.
@@ -264,7 +266,7 @@ void SayConCommand::Dispatch( const CCommand& command )
264266 }
265267
266268 // Find if the command is registered
267- SayCommandMap::iterator commandMapIter = g_SayCommandMap.find (szCommand );
269+ SayCommandMap::iterator commandMapIter = g_SayCommandMap.find (stripped_command[ 0 ] );
268270 if ( commandMapIter != g_SayCommandMap.end () )
269271 {
270272 // Get the CSayCommandManager instance for the command
You can’t perform that action at this time.
0 commit comments