Ram Search - when creating a new list, allocate the list to number of addresses to be added, not the size of the domain (meaning, factor in the byte size and CheckMisAligned settings).

This commit is contained in:
adelikat 2013-12-31 16:59:38 +00:00
parent e832951831
commit f195416713
1 changed files with 7 additions and 1 deletions

View File

@ -47,7 +47,13 @@ namespace BizHawk.Client.Common
{
_history.Clear();
var domain = _settings.Domain;
_watchList = new List<IMiniWatch>(domain.Size);
var listSize = domain.Size;
if (!_settings.CheckMisAligned)
{
listSize /= (int)_settings.Size;
}
_watchList = new List<IMiniWatch>(listSize);
switch (_settings.Size)
{