From 00e5d54be7c812557da22337e0e304e9ca964e79 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sun, 8 Sep 2024 19:10:29 +0200 Subject: [PATCH] cellSysutilAvc: fix cellSysutilAvcEnumPlayers error check --- rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp b/rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp index 99169a3837..bf0e53fc9e 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp @@ -63,9 +63,19 @@ error_code cellSysutilAvcEnumPlayers(vm::ptr players_id, vm::ptr p { cellSysutil.todo("cellSysutilAvcEnumPlayers(players_id=*0x%x, players_num=*0x%x)", players_id, players_num); - if (!players_id || !players_num) + if (!players_num) return CELL_AVC_ERROR_INVALID_ARGUMENT; + if (players_id) + { + // Fill players_id with players_num participants + } + else + { + // Return number of participants + *players_num = 0; + } + return CELL_OK; }