Fix the maximum size check of the payload.rpx

This commit is contained in:
Maschell 2020-10-19 00:19:04 +02:00
parent f93fc73ace
commit e5b03975f1

View File

@ -84,7 +84,8 @@ extern "C" int _start(int argc, char **argv) {
uint32_t moduleDataStartAddress = ((uint32_t) gModuleData + sizeof(module_information_t)); uint32_t moduleDataStartAddress = ((uint32_t) gModuleData + sizeof(module_information_t));
moduleDataStartAddress = (moduleDataStartAddress + 0x10000) & 0xFFFF0000; moduleDataStartAddress = (moduleDataStartAddress + 0x10000) & 0xFFFF0000;
std::optional<ModuleData> moduleData = ModuleDataFactory::load("fs:/vol/external01/wiiu/payload.rpx", 0x00FFF000, 0x00FFF000 - ApplicationMemoryEnd - (sizeof(module_information_t)), gModuleData->trampolines, DYN_LINK_TRAMPOLIN_LIST_LENGTH); // The module will be loaded to 0x00FFF000 - sizeof(payload.rpx)
std::optional <ModuleData> moduleData = ModuleDataFactory::load("fs:/vol/external01/wiiu/payload.rpx", 0x00FFF000, 0x00FFF000 - moduleDataStartAddress, gModuleData->trampolines, DYN_LINK_TRAMPOLIN_LIST_LENGTH);
if (moduleData) { if (moduleData) {
DEBUG_FUNCTION_LINE("Loaded module data"); DEBUG_FUNCTION_LINE("Loaded module data");
std::vector <RelocationData> relocData = moduleData->getRelocationDataList(); std::vector <RelocationData> relocData = moduleData->getRelocationDataList();