mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-31 13:00:59 +00:00
- fixed memory leak in UDMF loader.
When the extsector allocation was moved, this hadn't been adjusted yet, it still allocated its own buffer which never got freed again.
This commit is contained in:
parent
357163c60d
commit
ecc4d31aa5
1 changed files with 2 additions and 2 deletions
|
@ -2318,10 +2318,10 @@ public:
|
|||
// Create the real sectors
|
||||
Level->sectors.Alloc(ParsedSectors.Size());
|
||||
memcpy(&Level->sectors[0], &ParsedSectors[0], Level->sectors.Size() * sizeof(sector_t));
|
||||
Level->sectors[0].e = new extsector_t[Level->sectors.Size()];
|
||||
Level->extsectors.Alloc(Level->sectors.Size());
|
||||
for(unsigned i = 0; i < Level->sectors.Size(); i++)
|
||||
{
|
||||
Level->sectors[i].e = &Level->sectors[0].e[i];
|
||||
Level->sectors[i].e = &Level->extsectors[i];
|
||||
}
|
||||
// Now create the scrollers.
|
||||
for (auto &scroll : UDMFScrollers)
|
||||
|
|
Loading…
Reference in a new issue