From 3780fdb1cf096ca36027c568b55a99e4cf42b216 Mon Sep 17 00:00:00 2001 From: qloak Date: Fri, 7 Aug 2026 11:28:28 -0700 Subject: [PATCH] General fixes --- Minecraft.Client/Common/DLC/DLCManager.cpp | 11 +++++++++++ .../Common/XUI/XUI_Scene_AbstractContainer.cpp | 7 +------ Minecraft.Client/PS3/PS3Extras/ShutdownManager.cpp | 6 ++---- .../PSVita/PSVitaExtras/ShutdownManager.cpp | 6 ++---- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Minecraft.Client/Common/DLC/DLCManager.cpp b/Minecraft.Client/Common/DLC/DLCManager.cpp index aa219db5..9d4c07ca 100644 --- a/Minecraft.Client/Common/DLC/DLCManager.cpp +++ b/Minecraft.Client/Common/DLC/DLCManager.cpp @@ -406,6 +406,12 @@ bool DLCManager::processDLCDataFile(DWORD &dwFilesProcessed, PBYTE pbData, DWORD unsigned int uiVersion=*(unsigned int *)pbData; uiCurrentByte+=sizeof(int); + if(uiVersion > CURRENT_DLC_VERSION_NUM) + { + if(pbData!=NULL) delete [] pbData; + app.DebugPrintf("DLC version of %d is newer than this build can read (%d)\n", uiVersion, CURRENT_DLC_VERSION_NUM); + return false; + } if(uiVersion < CURRENT_DLC_VERSION_NUM) { if(pbData!=NULL) delete [] pbData; @@ -613,6 +619,11 @@ DWORD DLCManager::retrievePackID(PBYTE pbData, DWORD dwLength, DLCPack *pack) unsigned int uiVersion=*(unsigned int *)pbData; uiCurrentByte+=sizeof(int); + if(uiVersion > CURRENT_DLC_VERSION_NUM) + { + app.DebugPrintf("DLC version of %d is newer than this build can read (%d)\n", uiVersion, CURRENT_DLC_VERSION_NUM); + return 0; + } if(uiVersion < CURRENT_DLC_VERSION_NUM) { app.DebugPrintf("DLC version of %d is too old to be read\n", uiVersion); diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.cpp index 15ec6f58..502033e9 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.cpp @@ -454,12 +454,7 @@ void CXuiSceneAbstractContainer::SetPointerText(vector *description, return; } - wstring combinedText; - for(size_t i = 0; i < description->size(); ++i) - { - combinedText += (*description)[i].text; - if(i + 1 < description->size()) combinedText += L"\n"; - } + wstring combinedText = HtmlString::Compose(description); vector unformattedStrings; for(size_t i = 0; i < description->size(); ++i) diff --git a/Minecraft.Client/PS3/PS3Extras/ShutdownManager.cpp b/Minecraft.Client/PS3/PS3Extras/ShutdownManager.cpp index 69cd288a..2f1c689b 100644 --- a/Minecraft.Client/PS3/PS3Extras/ShutdownManager.cpp +++ b/Minecraft.Client/PS3/PS3Extras/ShutdownManager.cpp @@ -141,14 +141,12 @@ void ShutdownManager::SysUtilCallback(uint64_t status, uint64_t param, void *use StartShutdown(); break; case CELL_SYSUTIL_SYSTEM_MENU_OPEN: - // Tell the game UI to stop processing + case CELL_SYSUTIL_DRAWING_BEGIN: StorageManager.SetSystemUIDisplaying(true); break; case CELL_SYSUTIL_DRAWING_END: - StorageManager.SetSystemUIDisplaying(false); - break; - case CELL_SYSUTIL_DRAWING_BEGIN: case CELL_SYSUTIL_SYSTEM_MENU_CLOSE: + StorageManager.SetSystemUIDisplaying(false); break; case CELL_SYSUTIL_BGMPLAYBACK_PLAY: if( minecraft ) diff --git a/Minecraft.Client/PSVita/PSVitaExtras/ShutdownManager.cpp b/Minecraft.Client/PSVita/PSVitaExtras/ShutdownManager.cpp index 69cd288a..2f1c689b 100644 --- a/Minecraft.Client/PSVita/PSVitaExtras/ShutdownManager.cpp +++ b/Minecraft.Client/PSVita/PSVitaExtras/ShutdownManager.cpp @@ -141,14 +141,12 @@ void ShutdownManager::SysUtilCallback(uint64_t status, uint64_t param, void *use StartShutdown(); break; case CELL_SYSUTIL_SYSTEM_MENU_OPEN: - // Tell the game UI to stop processing + case CELL_SYSUTIL_DRAWING_BEGIN: StorageManager.SetSystemUIDisplaying(true); break; case CELL_SYSUTIL_DRAWING_END: - StorageManager.SetSystemUIDisplaying(false); - break; - case CELL_SYSUTIL_DRAWING_BEGIN: case CELL_SYSUTIL_SYSTEM_MENU_CLOSE: + StorageManager.SetSystemUIDisplaying(false); break; case CELL_SYSUTIL_BGMPLAYBACK_PLAY: if( minecraft )