Fix some "> MAX_*" to be ">= MAX_*".
This commit is contained in:
@@ -4838,7 +4838,7 @@ void BotCheckEvents(bot_state_t *bs, entityState_t *state) {
|
||||
}
|
||||
case EV_GLOBAL_SOUND:
|
||||
{
|
||||
if (state->eventParm < 0 || state->eventParm > MAX_SOUNDS) {
|
||||
if (state->eventParm < 0 || state->eventParm >= MAX_SOUNDS) {
|
||||
BotAI_Print(PRT_ERROR, "EV_GLOBAL_SOUND: eventParm (%d) out of range\n", state->eventParm);
|
||||
break;
|
||||
}
|
||||
@@ -4948,7 +4948,7 @@ void BotCheckEvents(bot_state_t *bs, entityState_t *state) {
|
||||
{
|
||||
//if this sound is played on the bot
|
||||
if (state->number == bs->client) {
|
||||
if (state->eventParm < 0 || state->eventParm > MAX_SOUNDS) {
|
||||
if (state->eventParm < 0 || state->eventParm >= MAX_SOUNDS) {
|
||||
BotAI_Print(PRT_ERROR, "EV_GENERAL_SOUND: eventParm (%d) out of range\n", state->eventParm);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user