BUG weaponbank 10 goes out of bounds


(SCDS_reyalP) #1

in src/cgame/cg_weapon.c:CG_WeaponBank_f


	if ( bank <= 0 || bank > MAX_WEAP_BANKS_MP ) {
		return;
	}

should be


	if ( bank <= 0 || bank >= MAX_WEAP_BANKS_MP ) {
		return;
	}

since all the weaponbank arrays have MAX_WEAP_BANKS_MP members.

The <= 0 is also questionable (since 0 is a valid weaponbank index), but it doesn’t cause problems unless your mod wants to use weaponbank 0 for something.