mirror of
https://github.com/ENSL/NS.git
synced 2024-11-24 21:41:17 +00:00
Fixed bot crash with empty chat message
* Bot no longer causes a crash if a player submits an empty chat message
This commit is contained in:
parent
b139fbf9b8
commit
4470feb4c5
1 changed files with 2 additions and 2 deletions
|
@ -430,7 +430,7 @@ void Host_Say( edict_t *pEntity, int teamonly )
|
|||
}
|
||||
|
||||
// Check to see if we are asking the AI commander for something
|
||||
if (!bMessageParsed)
|
||||
if (!bMessageParsed && AIMGR_IsBotEnabled())
|
||||
{
|
||||
char shortenedMsg[32];
|
||||
char* msg = (char*)CMD_ARGV(1);
|
||||
|
@ -440,7 +440,7 @@ void Host_Say( edict_t *pEntity, int teamonly )
|
|||
char* pch;
|
||||
pch = strtok(shortenedMsg, " ");
|
||||
|
||||
if (!stricmp(pch, kAICommanderRequest))
|
||||
if (pch != NULL && !stricmp(pch, kAICommanderRequest))
|
||||
{
|
||||
pch = strtok(NULL, " \n");
|
||||
|
||||
|
|
Loading…
Reference in a new issue