properly error out of G_NextWeapon() in case of error

This commit is contained in:
Fabian Greffrath 2024-01-03 11:24:35 +01:00
parent 67b45b701a
commit c7b2362a59

View File

@ -295,7 +295,7 @@ static int G_NextWeapon(int direction)
if (i == arrlen(weapon_order_table))
{
return wp_nochange;
I_Error("G_NextWeapon: Invalid weapon type %d", (int)weapon);
}
// Switch weapon. Don't loop forever.