1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-18 02:28:30 +02: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;
}
customlevelstats.clear();
// Old system
std::vector<std::string> customlevelnames;
std::vector<int> customlevelscores;