mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-11-18 12:04:27 +01:00
Don't run FindLibrary before actually checking id size (#5157)
Ancient libSceFios2 versions have a module_stop export which falls into the `ids.size() == 1 && sym_type == Loader::SymbolType::NoType` branch. Because we were initializing library and module up here, the game was accessing oob indexes and causing debug asserts.
This commit is contained in:
1 parent
4cbd23ef6d
commit
e868daca08
1 file changed
+2
-2
+2
-2
@@ -391,8 +391,8 @@ void Linker::Relocate(Module* module) {
|
||||
bool Linker::Resolve(const std::string& name, Loader::SymbolType sym_type, Module* m,
|
||||
Loader::SymbolRecord* return_info) {
|
||||
const auto ids = Common::SplitString(name, '#');
|
||||
const LibraryInfo* library = m->FindLibrary(ids[1]);
|
||||
const ModuleInfo* module = m->FindModule(ids[2]);
|
||||
const LibraryInfo* library;
|
||||
const ModuleInfo* module;
|
||||
if (ids.size() != 3 && sym_type != Loader::SymbolType::NoType) {
|
||||
return_info->virtual_address = 0;
|
||||
return_info->symbol.name = ids.at(0);
|
||||
|
||||
Reference in new issue
Block a user