Skip to content

Commit 6eb4413

Browse files
Protect against invalid readyweapon (#1807)
Co-authored-by: kraflab <[email protected]>
1 parent 29d3fab commit 6eb4413

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/p_pspr.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,10 @@ void A_Lower(player_t *player, pspdef_t *psp)
586586
return;
587587
}
588588

589-
player->readyweapon = player->pendingweapon;
589+
if (player->pendingweapon < NUMWEAPONS || !mbf21)
590+
{
591+
player->readyweapon = player->pendingweapon;
592+
}
590593

591594
P_BringUpWeapon(player);
592595
}

0 commit comments

Comments
 (0)