CID 22468 Division or modulo by zero

This commit is contained in:
Enno Rehling 2015-11-04 12:30:46 +01:00
parent 8bc44d82ed
commit 45b6de9c0d
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ static const char *make_names(const char *monster, int *num_postfix,
uu = rng_int() % *num_name;
/* nur 50% aller Namen haben "Nach-Teil", wenn kein Vor-Teil */
if (uv >= *num_prefix) {
if (*num_prefix > 0 && uv >= *num_prefix) {
un = rng_int() % *num_postfix;
}
else {