Use ToHexString extension

This commit is contained in:
YoshiRulz 2019-04-04 01:09:50 +10:00 committed by James Groom
parent a2a5ec7566
commit a6c1e69630
1 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,8 @@ using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using BizHawk.Common.NumberExtensions;
namespace BizHawk.Client.EmuHawk namespace BizHawk.Client.EmuHawk
{ {
public partial class GenericDebugger public partial class GenericDebugger
@ -75,7 +77,7 @@ namespace BizHawk.Client.EmuHawk
{ {
if (column == 0) if (column == 0)
{ {
text = string.Format($"{{0:X{_pcRegisterSize}}}", _disassemblyLines[index].Address); text = _disassemblyLines[index].Address.ToHexString(_pcRegisterSize);
} }
else if (column == 1) else if (column == 1)
{ {
@ -235,7 +237,7 @@ namespace BizHawk.Client.EmuHawk
blob.AppendLine(); blob.AppendLine();
} }
blob.Append(string.Format($"{{0:X{_pcRegisterSize}}}", _disassemblyLines[index].Address)) blob.Append(_disassemblyLines[index].Address.ToHexString(_pcRegisterSize))
.Append(" ") .Append(" ")
.Append(_disassemblyLines[index].Mnemonic); .Append(_disassemblyLines[index].Mnemonic);
} }