Skip to content

Commit

Permalink
calcDroidMuzzleBaseLocation: Sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Aug 11, 2024
1 parent 61ad6e3 commit d1c2e9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/droid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2183,7 +2183,7 @@ bool calcDroidMuzzleBaseLocation(const DROID *psDroid, Vector3i *muzzle, int wea

CHECK_DROID(psDroid);

if (psBodyImd && !psBodyImd->connectors.empty())
if (psBodyImd && static_cast<size_t>(weapon_slot) < psBodyImd->connectors.size())
{
Vector3i barrel(0, 0, 0);

Expand Down

0 comments on commit d1c2e9f

Please sign in to comment.