Use MAPWIDTH() to allocate map buffers

sona(), radmap2() and satmap() used WORLD_X + 1, which equals
MAPWIDTH(1).  Using MAPWIDTH() is somewhat clearer and cleaner.
This commit is contained in:
Markus Armbruster 2008-08-31 09:26:50 -04:00
parent d012940230
commit 7803cd9dd1
3 changed files with 5 additions and 5 deletions

View file

@ -73,7 +73,7 @@ satmap(int x, int y, int eff, int range, int flags, int type)
return;
if (!radbuf)
radbuf = malloc(WORLD_Y * (WORLD_X + 1));
radbuf = malloc(WORLD_Y * MAPWIDTH(1));
if (!rad) {
rad = malloc(WORLD_Y * sizeof(char *));
if (rad && radbuf) {