Hex Editor: Fix Cheat display

Fixes #1026
This commit is contained in:
alyosha-tas 2017-10-21 09:52:07 -04:00 committed by GitHub
parent 3c6dcf1dc3
commit 745e42a753
1 changed files with 16 additions and 2 deletions

View File

@ -526,7 +526,21 @@ namespace BizHawk.Client.EmuHawk
{
if (_addr + j + DataSize <= _domain.Size)
{
rowStr.AppendFormat(_digitFormatString, MakeValue(_addr + j));
int t_val = 0;
int t_next = 0;
for (int k = 0; k < DataSize; k++)
{
t_next = MakeValue(1, _addr + j + k);
t_val += (t_next << ((DataSize - k - 1) * 8));
if (_addr + j + k == 0x0020 || _addr + j + k == 0x0021)
{
Console.WriteLine(t_next);
}
}
rowStr.AppendFormat(_digitFormatString, t_val);// MakeValue(_addr + j));
}
else
{
@ -569,7 +583,7 @@ namespace BizHawk.Client.EmuHawk
{
if (Global.CheatList.IsActive(_domain, address))
{
return Global.CheatList.GetCheatValue(_domain, address, (WatchSize)DataSize ).Value;
return Global.CheatList.GetCheatValue(_domain, address, (WatchSize)dataSize ).Value;
}
switch (dataSize)