From 47ffa43ea19b257c2e010676988914149db1ca6e Mon Sep 17 00:00:00 2001 From: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Date: Sun, 2 Apr 2023 22:24:20 +0200 Subject: [PATCH] Check if the desired language is actually available --- Ryujinx.HLE/Loaders/Processes/ProcessResult.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Ryujinx.HLE/Loaders/Processes/ProcessResult.cs b/Ryujinx.HLE/Loaders/Processes/ProcessResult.cs index 392623501..b9596c8fd 100644 --- a/Ryujinx.HLE/Loaders/Processes/ProcessResult.cs +++ b/Ryujinx.HLE/Loaders/Processes/ProcessResult.cs @@ -52,7 +52,17 @@ namespace Ryujinx.HLE.Loaders.Processes { ulong programId = metaLoader.GetProgramId(); - Name = ApplicationControlProperties.Title[(int)titleLanguage].NameString.ToString(); + if (ApplicationControlProperties.Title.ItemsRo.Length > 0) + { + var langIndex = ApplicationControlProperties.Title.ItemsRo.Length > (int)titleLanguage ? (int)titleLanguage : 0; + + Name = ApplicationControlProperties.Title[langIndex].NameString.ToString(); + } + else + { + Name = metaLoader.GetProgramName(); + } + ProgramId = programId; ProgramIdText = $"{programId:x16}"; Is64Bit = metaLoader.IsProgram64Bit();