Kernel/SVC: Fixed the register order for svcCreateMemoryBlock.

R0 is used as the last parameter instead of R4.
This commit is contained in:
Subv 2016-04-17 13:36:15 -05:00
parent 282a2ad539
commit 42a50da76b
2 changed files with 3 additions and 2 deletions

View file

@ -170,7 +170,8 @@ template<ResultCode func(s64*, u32, s32)> void Wrap() {
template<ResultCode func(u32*, u32, u32, u32, u32)> void Wrap() {
u32 param_1 = 0;
u32 retval = func(&param_1, PARAM(1), PARAM(2), PARAM(3), PARAM(4)).raw;
// The last parameter is passed in R0 instead of R4
u32 retval = func(&param_1, PARAM(1), PARAM(2), PARAM(3), PARAM(0)).raw;
Core::g_app_core->SetReg(1, param_1);
FuncReturn(retval);
}