CID 22462 Division or modulo by zero

This commit is contained in:
Enno Rehling 2015-11-03 23:11:34 +01:00
parent e6973ff394
commit fff40f048b
1 changed files with 1 additions and 0 deletions

View File

@ -54,6 +54,7 @@ const terrain_type *random_terrain(const terrain_type * terrains[],
const terrain_type *terrain;
int n;
assert(size > 0);
if (distribution) {
ndistribution = 0;
for (n = 0; n != size; ++n) {