author | Darkvater |
Wed, 03 May 2006 21:34:07 +0000 | |
branch | 0.4 |
changeset 10007 | 70ea6f8bc185 |
parent 10006 | 9981b098f137 |
child 10008 | 601b4e5c76eb |
--- a/map.c Wed May 03 21:28:48 2006 +0000 +++ b/map.c Wed May 03 21:34:07 2006 +0000 @@ -40,7 +40,7 @@ _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");