use module_start_func instead of entry_addr if entry_addr is 0

, this fixes Dissidia Final Fantasy 012. Maybe this is not a good fix.
This commit is contained in:
oioitff 2013-03-03 17:11:05 +08:00
parent 2211711164
commit f27cc58f4b

View File

@ -559,6 +559,10 @@ Module *__KernelLoadELFFromPtr(const u8 *ptr, u32 loadAddress, std::string *erro
}
module->nm.entry_addr = reader.GetEntryPoint();
// use module_start_func instead of entry_addr if entry_addr is 0
if (module->nm.entry_addr == 0)
module->nm.entry_addr = module->nm.module_start_func;
if (newptr)
{