From 18f167ddd088e5d15523a7b34cd4fcb0b4e6d7e5 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Wed, 22 Jan 2020 19:25:54 +0100 Subject: [PATCH] HLE: Fix error checks in cellAudioInRegisterDevice --- rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp b/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp index 9ea98cdda6..7dace7ec9b 100644 --- a/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp @@ -271,7 +271,8 @@ error_code cellAudioInRegisterDevice(u64 deviceType, vm::cptr name, vm::pt { cellAvconfExt.todo("cellAudioInRegisterDevice(deviceType=0x%llx, name=%s, option=*0x%x, config=*0x%x)", deviceType, name, option, config); - if (!option || !config || !name) // TODO: check first member of option for > 5 ? + // option must be null, volume can be 1 (soft) to 5 (loud) (raises question about check for volume = 0) + if (option || !config || !name || config->volume > 5) { return CELL_AUDIO_IN_ERROR_ILLEGAL_PARAMETER; }