Skip to content

Commit

Permalink
Protect against invalid readyweapon (#1807)
Browse files Browse the repository at this point in the history
Co-authored-by: kraflab <[email protected]>
  • Loading branch information
fabiangreffrath and kraflab authored Jul 31, 2024
1 parent 29d3fab commit 6eb4413
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/p_pspr.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,10 @@ void A_Lower(player_t *player, pspdef_t *psp)
return;
}

player->readyweapon = player->pendingweapon;
if (player->pendingweapon < NUMWEAPONS || !mbf21)
{
player->readyweapon = player->pendingweapon;
}

P_BringUpWeapon(player);
}
Expand Down

0 comments on commit 6eb4413

Please sign in to comment.