Prevent potential division by zero

This commit is contained in:
Yamagi Burmeister 2012-06-26 14:22:07 +02:00
parent 3e063fe549
commit ad3fe0b674

View file

@ -123,7 +123,7 @@ void DoRespawn (edict_t *ent)
for (count = 0, ent = master; ent; ent = ent->chain, count++) 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++) for (count = 0, ent = master; count < choice; ent = ent->chain, count++)
; ;