mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Fix typo in nvAddressSpaceModify
This commit is contained in:
parent
6df890c47b
commit
b3dd512253
@ -85,7 +85,7 @@ Result nvAddressSpaceModify(NvAddressSpace* a, iova_t iova, u64 offset, u64 size
|
|||||||
if (iova & (a->page_size - 1))
|
if (iova & (a->page_size - 1))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_BadInput);
|
return MAKERESULT(Module_Libnx, LibnxError_BadInput);
|
||||||
u64 end_offset = (offset + size + a->page_size - 1) &~ (a->page_size - 1);
|
u64 end_offset = (offset + size + a->page_size - 1) &~ (a->page_size - 1);
|
||||||
offset &= a->page_size - 1;
|
offset &= ~(a->page_size - 1);
|
||||||
size = end_offset - offset;
|
size = end_offset - offset;
|
||||||
return nvioctlNvhostAsGpu_MapBufferEx(a->fd, NvMapBufferFlags_Modify, kind, 0, 0, offset, size, iova, NULL);
|
return nvioctlNvhostAsGpu_MapBufferEx(a->fd, NvMapBufferFlags_Modify, kind, 0, 0, offset, size, iova, NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user