proc_ui: Fix crash due to incorrect version handling

Resolves a crash in NEX Remix
This commit is contained in:
Exzap 2024-05-04 08:05:10 +02:00
parent a16c37f0c5
commit 91a010fbdd
2 changed files with 4 additions and 1 deletions

View File

@ -391,6 +391,9 @@ namespace proc_ui
{
cemuLog_log(LogType::Force, "ProcUI: Trying to register callback before init");
cemu_assert_suspicious();
// this shouldn't happen but lets set the memory pointers anyway to prevent a crash in case the user has incorrect meta info
s_memAllocPtr = gCoreinitData->MEMAllocFromDefaultHeap.GetMPTR();
s_memFreePtr = gCoreinitData->MEMFreeToDefaultHeap.GetMPTR();
}
ProcUIInternalCallbackEntry* entry = (ProcUIInternalCallbackEntry*)_AllocMem(sizeof(ProcUIInternalCallbackEntry));
entry->funcPtr = funcPtr;

View File

@ -563,7 +563,7 @@ bool TitleInfo::ParseAppXml(std::vector<uint8>& appXmlData)
else if (name == "group_id")
m_parsedAppXml->group_id = (uint32)std::stoull(child.text().as_string(), nullptr, 16);
else if (name == "sdk_version")
m_parsedAppXml->sdk_version = (uint32)std::stoull(child.text().as_string(), nullptr, 16);
m_parsedAppXml->sdk_version = (uint32)std::stoull(child.text().as_string(), nullptr, 10);
}
return true;
}