CID 22468 Division or modulo by zero

This commit is contained in:
Enno Rehling 2015-11-03 23:18:56 +01:00
parent 1f055b3175
commit 7efda5f967
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_postfix > 0 && uv >= *num_prefix) {
un = rng_int() % *num_postfix;
}
else {