mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 22:41:25 +12:00
RSX: Fix UB in FIFO_control::get_current_arg_ptr()
This commit is contained in:
parent
583ec5d819
commit
8ed2089070
1 changed files with 5 additions and 1 deletions
|
@ -233,7 +233,11 @@ namespace rsx
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Return a raw pointer with no limited access
|
// Return a raw pointer with no limited access
|
||||||
return {static_cast<const u32*>(vm::base(m_iotable->get_addr(m_internal_get))), 0x10000};
|
constexpr u32 _1m = 0x100000;
|
||||||
|
const u32 base = m_iotable->get_addr(m_internal_get);
|
||||||
|
const u32 base_1m = m_iotable->get_addr(m_internal_get + _1m);
|
||||||
|
|
||||||
|
return {static_cast<const u32*>(vm::base(base)), (base_1m - _1m == base ? _1m : (_1m - (m_internal_get % _1m))) / 4 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue