From d3c978e5cc570824df8904137fc0b1fe966ced09 Mon Sep 17 00:00:00 2001 From: emmaus Date: Thu, 4 Oct 2018 11:46:37 +0000 Subject: [PATCH] fix index in hex conversion --- Ryujinx.HLE/Utilities/UInt128.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Ryujinx.HLE/Utilities/UInt128.cs b/Ryujinx.HLE/Utilities/UInt128.cs index d0f080e2e2..a2546dd3cd 100644 --- a/Ryujinx.HLE/Utilities/UInt128.cs +++ b/Ryujinx.HLE/Utilities/UInt128.cs @@ -38,11 +38,8 @@ namespace Ryujinx.HLE.Utilities throw new ArgumentException("Invalid Hex value!", nameof(UInt128Hex)); } - byte[] LowBytes = StringUtils.HexToBytes(UInt128Hex.Substring(8)); - byte[] HighBytes = StringUtils.HexToBytes(UInt128Hex.Substring(0,8)); - - Low = BitConverter.ToInt64(LowBytes); - High = BitConverter.ToInt64(HighBytes); + Low = Convert.ToInt64(UInt128Hex.Substring(16),16); + High = Convert.ToInt64(UInt128Hex.Substring(0, 16), 16); } public void Write(BinaryWriter BinaryWriter)