(svn r4688) - Ensure the map memory is cleared after it is allocated. This fixes random deserts that sometimes occurred.

This commit is contained in:
peter1138 2006-05-02 14:34:00 +00:00
parent 73b718a667
commit 143b8d1f67
1 changed files with 1 additions and 1 deletions

2
map.c
View File

@ -40,7 +40,7 @@ void AllocateMap(uint size_x, uint size_y)
_map_tile_mask = _map_size - 1;
free(_m);
_m = malloc(_map_size * sizeof(*_m));
_m = calloc(_map_size, sizeof(*_m));
// XXX TODO handle memory shortage more gracefully
if (_m == NULL) error("Failed to allocate memory for the map");