From 00e0e857934b52d4078fb0d9851b1b861bee3f1e Mon Sep 17 00:00:00 2001 From: Fabian Schaffert Date: Sun, 16 Nov 2014 14:43:58 +0100 Subject: [PATCH] Fixes return value of sys_semaphore_create() In case of att.addr() being NULL, CELL_EFAULT must be returnd and not CELL_EINVAL, according to the corresponding ps3autotest. --- rpcs3/Emu/SysCalls/lv2/sys_semaphore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/SysCalls/lv2/sys_semaphore.cpp b/rpcs3/Emu/SysCalls/lv2/sys_semaphore.cpp index e5fd7463b5..d194a0b563 100644 --- a/rpcs3/Emu/SysCalls/lv2/sys_semaphore.cpp +++ b/rpcs3/Emu/SysCalls/lv2/sys_semaphore.cpp @@ -33,7 +33,7 @@ s32 sys_semaphore_create(vm::ptr sem, vm::ptr attr if (attr.addr() == NULL) { sys_semaphore.Error("sys_semaphore_create(): An invalid argument value is specified (attr_addr=0x%x)", attr.addr()); - return CELL_EINVAL; + return CELL_EFAULT; } if (max_count <= 0 || initial_count > max_count || initial_count < 0)