diff options
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Time/StaticService')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForGlue.cs | 5 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForPsc.cs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForGlue.cs b/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForGlue.cs index da806ab6..98d4b617 100644 --- a/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForGlue.cs +++ b/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForGlue.cs @@ -1,6 +1,7 @@ using Ryujinx.Common.Logging; using Ryujinx.Cpu; using Ryujinx.HLE.HOS.Services.Time.TimeZone; +using Ryujinx.HLE.Utilities; using System; using System.Text; @@ -35,7 +36,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.StaticService return ResultCode.PermissionDenied; } - string locationName = Encoding.ASCII.GetString(context.RequestData.ReadBytes(0x24)).TrimEnd('\0'); + string locationName = StringUtils.ReadInlinedAsciiString(context.RequestData, 0x24); return _timeZoneContentManager.SetDeviceLocationName(locationName); } @@ -97,7 +98,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.StaticService throw new InvalidOperationException(); } - string locationName = Encoding.ASCII.GetString(context.RequestData.ReadBytes(0x24)).TrimEnd('\0'); + string locationName = StringUtils.ReadInlinedAsciiString(context.RequestData, 0x24); ResultCode resultCode = _timeZoneContentManager.LoadTimeZoneRule(out TimeZoneRule rules, locationName); diff --git a/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForPsc.cs b/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForPsc.cs index d0ed9379..83d745e3 100644 --- a/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForPsc.cs +++ b/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForPsc.cs @@ -125,7 +125,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.StaticService (ulong bufferPosition, ulong bufferSize) = context.Request.GetBufferType0x21(); - string locationName = Encoding.ASCII.GetString(context.RequestData.ReadBytes(0x24)).TrimEnd('\0'); + string locationName = StringUtils.ReadInlinedAsciiString(context.RequestData, 0x24); ResultCode result; |
