summaryrefslogtreecommitdiff
path: root/src/game/bg_voice.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/bg_voice.c')
-rw-r--r--src/game/bg_voice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/bg_voice.c b/src/game/bg_voice.c
index 7f4f4ae5..c0764dd6 100644
--- a/src/game/bg_voice.c
+++ b/src/game/bg_voice.c
@@ -625,7 +625,7 @@ voiceTrack_t *BG_VoiceTrackFind( voiceTrack_t *head, team_t team,
return NULL;
// return randomly selected match
- selectedMatch = rand() % matchCount;
+ selectedMatch = rand() / ( RAND_MAX / matchCount + 1 );
vt = head;
i = 0;
j = 0;