Fix possible division by zero

This commit is contained in:
Yamagi Burmeister 2012-06-27 14:24:26 +02:00
parent ec3ceb2696
commit 6aeeda2a9d
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ void DoRespawn (edict_t *ent)
for (count = 0, ent = master; ent; ent = ent->chain, count++)
;
choice = rand() % count;
choice = count ? randk() % count : 0;
for (count = 0, ent = master; count < choice; ent = ent->chain, count++)
;