mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Make sure to reserve() exactly the right amount of elements for the std::vector before filling it with CheatSearchResult's, in order to prevent automatic re-allocations.
It turns out that this (somewhat) gets rid of memory-related exceptions which used to occur (especially) during 8-bit cheat searches. At least this is the case with my computer that has 3GB of RAM (the issue didn't seem to be caused by 100% of RAM usage, however). Hopefully you'll be able to perform the following steps without errors now: 1. Open any game in Dolphin; 2. Go to Tools->Cheats Manager, and open the "Cheat Search" tab; 3. Preferably set the "Data Size" to 8-bit (the smaller, the more initial search results); 4. Press the "New Scan" button; 5. Use the "Unknown" search filter (which won't narrow the results down at all); 6. Press the "Next Scan" button. (oh, and fix a typo in a comment I introduced in r6791 :p) Anyway, make sure to tell me any eventual errors/regressions. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7596 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -159,7 +159,7 @@ bool CWII_IPC_HLE_Device_fs::IOCtlV(u32 _CommandAddress)
|
||||
std::string FileName = name + ext;
|
||||
|
||||
// Decode entities of invalid file system characters so that
|
||||
// games (such as HB:HBP) will be able to find what they expect.
|
||||
// games (such as HP:HBP) will be able to find what they expect.
|
||||
for (Common::replace_v::const_iterator it = replacements.begin(); it != replacements.end(); ++it)
|
||||
{
|
||||
for (size_t j = 0; (j = FileName.find(it->second, j)) != FileName.npos; ++j)
|
||||
|
Reference in New Issue
Block a user