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 12, 2024
1 parent 56c55dd commit 12357c1
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 12357c1

Please sign in to comment.