mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Fix potential index out of bounds
This commit is contained in:
parent
4610a2403a
commit
79a81b3e58
1 changed files with 1 additions and 1 deletions
|
@ -2306,7 +2306,7 @@ int BotExpandChatMessage(char *outmessage, char *message, unsigned long mcontext
|
|||
} //end while
|
||||
//step over the trailing escape char
|
||||
if (*msgptr) msgptr++;
|
||||
if (num > MAX_MATCHVARIABLES)
|
||||
if (num >= MAX_MATCHVARIABLES)
|
||||
{
|
||||
botimport.Print(PRT_ERROR, "BotConstructChat: message %s variable %d out of range\n", message, num);
|
||||
return qfalse;
|
||||
|
|
Loading…
Reference in a new issue