Skip to content

Commit

Permalink
Merge pull request #5603 from Goober5000/fix_message_candidates
Browse files Browse the repository at this point in the history
fix random selection of message candidates
  • Loading branch information
Goober5000 authored Sep 16, 2023
2 parents 0b54c74 + 1618030 commit be678c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/mission/missionmessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@ int pick_persona(ship* shipp) {
if (count == 1) {
return candidates[0];
} else if (count > 1) {
return candidates[Random::next(0, count)];
return candidates[Random::next(count)];
} else if (persona_type & PERSONA_FLAG_SUPPORT) {
// Species without a support persona (e.g. the UEF) historically used the
// first support persona; retain that behavior
Expand Down

0 comments on commit be678c2

Please sign in to comment.