[Kernel] Fix incorrect TranslatePhysical usage in XFile

This commit is contained in:
Triang3l 2020-02-23 14:51:24 +03:00
parent d484051942
commit cf99696e79
1 changed files with 3 additions and 1 deletions

View File

@ -140,7 +140,9 @@ X_STATUS XFile::Read(uint32_t buffer_guest_address, uint32_t buffer_length,
} else {
result = file_->ReadSync(
buffer_physical_heap
? memory()->TranslatePhysical(buffer_guest_address)
? memory()->TranslatePhysical(
buffer_physical_heap->GetPhysicalAddress(
buffer_guest_address))
: memory()->TranslateVirtual(buffer_guest_address),
buffer_length, size_t(byte_offset), &bytes_read);
if (XSUCCEEDED(result)) {