Skip to content

Commit e0c4c30

Browse files
committed
fix bounds check
1 parent 6c42d9c commit e0c4c30

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

code/scripting/api/objs/comm_order.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ ADE_FUNC(selectItem, l_Comm_Item, nullptr, "Selects the item and either proceeds
6060
if (!ade_get_args(L, "o", l_Comm_Item.Get(&current)))
6161
return ADE_RETURN_FALSE;
6262

63-
if (current < 0 || current > Num_menu_items) {
63+
if (current < 0 || current >= Num_menu_items) {
6464
LuaError(L, "Lua tried to select squad message that is not valid!");
6565
return ADE_RETURN_FALSE;
6666
}

0 commit comments

Comments
 (0)