diff --git a/src/core/libraries/kernel/memory.cpp b/src/core/libraries/kernel/memory.cpp index 02bed3928..ce694dc1e 100644 --- a/src/core/libraries/kernel/memory.cpp +++ b/src/core/libraries/kernel/memory.cpp @@ -574,7 +574,7 @@ void* PS4_SYSV_ABI posix_mmap(void* addr, u64 len, s32 prot, s32 flags, s32 fd, const auto mem_prot = static_cast(prot); const auto mem_flags = static_cast(flags); - s32 result = 0; + s32 result = ORBIS_OK; if (fd == -1) { result = memory->MapMemory(&addr_out, std::bit_cast(addr), len, mem_prot, mem_flags, Core::VMAType::Flexible); @@ -583,7 +583,7 @@ void* PS4_SYSV_ABI posix_mmap(void* addr, u64 len, s32 prot, s32 flags, s32 fd, fd, phys_addr); } - if (result < 0) { + if (result != ORBIS_OK) { // If the memory mappings fail, mmap sets errno to the appropriate error code, // then returns (void*)-1; ErrSceToPosix(result); @@ -605,7 +605,7 @@ s32 PS4_SYSV_ABI sceKernelMmap(void* addr, u64 len, s32 prot, s32 flags, s32 fd, // Set the outputted address *res = addr_out; - return 0; + return ORBIS_OK; } s32 PS4_SYSV_ABI sceKernelConfiguredFlexibleMemorySize(u64* sizeOut) {