From a60c6aa7016cd1f1c49cda686c79e7142085e0bd Mon Sep 17 00:00:00 2001 From: Anthony Date: Sat, 27 Feb 2021 21:09:55 +1300 Subject: [PATCH] - Adjust string format so we don't write more than 40 chars - Align comment --- src/common/xbe/Xbe.h | 2 +- src/core/kernel/init/CxbxKrnl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/xbe/Xbe.h b/src/common/xbe/Xbe.h index df5d6daab..13bb4c87d 100644 --- a/src/common/xbe/Xbe.h +++ b/src/common/xbe/Xbe.h @@ -150,7 +150,7 @@ class Xbe : public Error uint32_t dwSize; // 0x0000 - size of certificate uint32_t dwTimeDate; // 0x0004 - timedate stamp uint32_t dwTitleId; // 0x0008 - title id - wchar_t wsTitleName[40]; // 0x000C - title name (unicode) + wchar_t wsTitleName[40]; // 0x000C - title name (unicode) uint32_t dwAlternateTitleId[0x10]; // 0x005C - alternate title ids uint32_t dwAllowedMedia; // 0x009C - allowed media types uint32_t dwGameRegion; // 0x00A0 - game region diff --git a/src/core/kernel/init/CxbxKrnl.cpp b/src/core/kernel/init/CxbxKrnl.cpp index e5bca17d0..08369ca04 100644 --- a/src/core/kernel/init/CxbxKrnl.cpp +++ b/src/core/kernel/init/CxbxKrnl.cpp @@ -1418,7 +1418,7 @@ __declspec(noreturn) void CxbxKrnlInit EmuLogInit(LOG_LEVEL::INFO, "XBE TitleID : %s", FormatTitleId(g_pCertificate->dwTitleId).c_str()); EmuLogInit(LOG_LEVEL::INFO, "XBE TitleID (Hex) : 0x%s", titleIdHex.str().c_str()); EmuLogInit(LOG_LEVEL::INFO, "XBE Version : 1.%02d", g_pCertificate->dwVersion); - EmuLogInit(LOG_LEVEL::INFO, "XBE TitleName : %ls", g_pCertificate->wsTitleName); + EmuLogInit(LOG_LEVEL::INFO, "XBE TitleName : %.40ls", g_pCertificate->wsTitleName); EmuLogInit(LOG_LEVEL::INFO, "XBE Region : %s", CxbxKrnl_Xbe->GameRegionToString()); }