div by zero in server when cl_weaponpriority* lists only unavailable weapons
When using a configuration (as described here) such as:
cl_weaponpriority8 "hlac hagar seeker"
bind c "impulse 208"
on a map lacking these weapons, this error occurs when the keybind is pressed:
Attempted division by zero in server
s2908: DIV GLOBAL47534, GLOBAL47535, GLOBAL47516
ametime : __builtin_mod : statement 0
arm4 : W_GetCycleWeapon : statement 141
arm4 : W_CycleWeapon : statement 7
_up_y : IMP_weapon_priority_8_prev_handle : statement 24
./server/impulse.qc : ImpulseCommands : statement 55
p : _PlayerPostThink : statement 84
: PlayerPostThink : statement 3
Also, the message about the weapon not being available on the map, is not displayed.