1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Clear level stats vector before loading them into the vector

Otherwise this results in what is basically a memory leak that can be
triggered repeatedly by selecting "play a level" over and over again.

Fixes #885.
This commit is contained in:
Misa 2022-08-03 17:21:35 -07:00
parent 424c8c80be
commit 550dfe676a

View file

@ -483,6 +483,8 @@ void Game::loadcustomlevelstats(void)
return; return;
} }
customlevelstats.clear();
// Old system // Old system
std::vector<std::string> customlevelnames; std::vector<std::string> customlevelnames;
std::vector<int> customlevelscores; std::vector<int> customlevelscores;