From bb9405e499be3f2ea8c82ff829fd507da6229df5 Mon Sep 17 00:00:00 2001 From: Thog Date: Sun, 16 Jun 2019 23:10:56 +0200 Subject: [PATCH] Address comments --- Ryujinx.HLE/HOS/Services/Set/ISettingsServer.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Ryujinx.HLE/HOS/Services/Set/ISettingsServer.cs b/Ryujinx.HLE/HOS/Services/Set/ISettingsServer.cs index e6a20aa203..3b8e595c44 100644 --- a/Ryujinx.HLE/HOS/Services/Set/ISettingsServer.cs +++ b/Ryujinx.HLE/HOS/Services/Set/ISettingsServer.cs @@ -1,6 +1,7 @@ using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.SystemState; +using System; using System.Collections.Generic; using static Ryujinx.HLE.HOS.ErrorCode; @@ -53,7 +54,7 @@ namespace Ryujinx.HLE.HOS.Services.Set { int languageIndex = context.RequestData.ReadInt32(); - if (languageIndex < 0 || languageIndex >= SystemStateMgr.LanguageCodes.Length) + if ((uint)languageIndex >= (uint)SystemStateMgr.LanguageCodes.Length) { return MakeError(ErrorModule.Settings, SettingsError.LanguageOutOfRange); } @@ -66,7 +67,7 @@ namespace Ryujinx.HLE.HOS.Services.Set // GetAvailableLanguageCodeCount() -> u32 public static long GetAvailableLanguageCodeCount(ServiceCtx context) { - context.ResponseData.Write(System.Math.Min(SystemStateMgr.LanguageCodes.Length, 0xF)); + context.ResponseData.Write(Math.Min(SystemStateMgr.LanguageCodes.Length, 0xF)); return 0; }