mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
Various fixes (Trophy, Gcm corrections, stack alloc) (#2894)
* Fixed sys_get_random_number generating less bytes than needed, and ceiling the buffer size in 0x1000 instead of failing * Corrected alignment check in libgcm * Now calling callback of sceNpManagerRegisterCallback * Fixed trophies
This commit is contained in:
parent
d3f13ab8a3
commit
caab400258
7 changed files with 45 additions and 20 deletions
|
@ -53,12 +53,14 @@ s32 sys_get_random_number(vm::ptr<u8> addr, u64 size)
|
|||
{
|
||||
sysPrxForUser.warning("sys_get_random_number(addr=*0x%x, size=%d)", addr, size);
|
||||
|
||||
if (size > 4096)
|
||||
size = 4096;
|
||||
|
||||
for (u32 i = 0; i < (u32)size - 1; i++)
|
||||
if (size > 0x1000)
|
||||
{
|
||||
addr[i] = rand() % 256;
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < (u32)size; i++)
|
||||
{
|
||||
addr[i] = rand() & 0xff;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue