mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-26 13:01:04 +00:00
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:
parent
5471165397
commit
c2194db299
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue