Fix possible division by zero

This commit is contained in:
Yamagi Burmeister 2012-06-27 14:24:26 +02:00
parent ec3ceb2696
commit 6aeeda2a9d

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++)
;