[saco] Match CMenuPool::GetSlotState; ScrInitMenu reaches the slot array through it, not by direct indexing

This commit is contained in:
ricardoofnl
2026-09-04 23:03:37 +07:00
parent 63c79b1162
commit 2a481d8ff8
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -13,6 +13,8 @@ public:
BYTE m_byteExited;
public:
int GetSlotState(BYTE byteMenuID) { if(byteMenuID > MAX_MENUS) return 0; return m_bMenuSlotState[byteMenuID]; }
CMenuPool();
~CMenuPool();
+1 -1
View File
@@ -707,7 +707,7 @@ void ScrInitMenu(RPCParameters *rpcParams)
bsData.Read(MenuInteraction.bMenu);
for(i = 0; i < MAX_MENU_ITEMS; i++) bsData.Read(MenuInteraction.bRow[i]);
if(byteMenuID <= MAX_MENUS && pMenuPool->m_bMenuSlotState[byteMenuID]) pMenuPool->Delete(byteMenuID);
if(pMenuPool->GetSlotState(byteMenuID)) pMenuPool->Delete(byteMenuID);
CMenu *pMenu = pMenuPool->New(byteMenuID, fX, fY, iColumns + 1, fCol1Width, fCol2Width, &MenuInteraction);
if(!pMenu) return;