make a private copy of the map name while doing maplist. Fixes the mangled

map names in directories with lots of maps.
This commit is contained in:
Bill Currie 2001-02-07 19:36:55 +00:00
parent 5471165397
commit c2194db299

View file

@ -269,6 +269,10 @@ maplist_new (void)
static void
maplist_free (struct maplist *maplist)
{
int i;
for (i=0; i < maplist->count; i++)
free (maplist->list[i]);
free (maplist->list);
free (maplist);
}
@ -288,7 +292,7 @@ maplist_add_map (struct maplist *maplist, char *fname)
}
maplist->list = new_list;
}
maplist->list[maplist->count++] = fname;
maplist->list[maplist->count++] = strdup (fname);
}
static int