mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 14:37:08 +00:00
Fix _sys_prx_get_module_info p0pt->filename writing with 0 size
This commit is contained in:
parent
7a8772dafa
commit
f6cf36f6a7
2 changed files with 5 additions and 6 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "Utilities/VirtualMemory.h"
|
||||
#include "Utilities/bin_patch.h"
|
||||
#include "Utilities/StrUtil.h"
|
||||
#include "Crypto/sha1.h"
|
||||
#include "Crypto/unself.h"
|
||||
#include "Loader/ELF.h"
|
||||
|
|
@ -942,10 +943,10 @@ std::shared_ptr<lv2_prx> ppu_load_prx(const ppu_prx_object& elf, const std::stri
|
|||
};
|
||||
|
||||
// Access library information (TODO)
|
||||
const auto& lib_info = vm::cptr<ppu_prx_library_info>(vm::cast(prx->segs[0].addr + elf.progs[0].p_paddr - elf.progs[0].p_offset, HERE));
|
||||
const auto& lib_name = std::string(lib_info->name);
|
||||
const vm::cptr<ppu_prx_library_info> lib_info = vm::cast(prx->segs[0].addr + elf.progs[0].p_paddr - elf.progs[0].p_offset, HERE);
|
||||
const std::string lib_name = lib_info->name;
|
||||
|
||||
std::memcpy(prx->module_info_name, lib_info->name, sizeof(prx->module_info_name));
|
||||
strcpy_trunc(prx->module_info_name, lib_name);
|
||||
prx->module_info_version[0] = lib_info->version[0];
|
||||
prx->module_info_version[1] = lib_info->version[1];
|
||||
prx->module_info_attributes = lib_info->attributes;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue