Prevent a divion by zero

This commit is contained in:
Yamagi Burmeister 2012-06-02 12:56:07 +02:00
parent 12ce981d64
commit 4ece3714aa

View file

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