mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-26 21:10:59 +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
|
static void
|
||||||
maplist_free (struct maplist *maplist)
|
maplist_free (struct maplist *maplist)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i=0; i < maplist->count; i++)
|
||||||
|
free (maplist->list[i]);
|
||||||
free (maplist->list);
|
free (maplist->list);
|
||||||
free (maplist);
|
free (maplist);
|
||||||
}
|
}
|
||||||
|
@ -288,7 +292,7 @@ maplist_add_map (struct maplist *maplist, char *fname)
|
||||||
}
|
}
|
||||||
maplist->list = new_list;
|
maplist->list = new_list;
|
||||||
}
|
}
|
||||||
maplist->list[maplist->count++] = fname;
|
maplist->list[maplist->count++] = strdup (fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in a new issue