diff --git a/rpcs3/Emu/Cell/Modules/cellMsgDialog.cpp b/rpcs3/Emu/Cell/Modules/cellMsgDialog.cpp index c3e460d146..0be416f123 100644 --- a/rpcs3/Emu/Cell/Modules/cellMsgDialog.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMsgDialog.cpp @@ -269,7 +269,7 @@ s32 cellMsgDialogProgressBarSetMsg(u32 progressBarIndex, vm::cptr msgStrin return CELL_MSGDIALOG_ERROR_DIALOG_NOT_OPENED; } - if (progressBarIndex >= dlg->type.progress_bar_count) + if (progressBarIndex >= dlg->type.progress_bar_count || !msgString) { return CELL_MSGDIALOG_ERROR_PARAM; } diff --git a/rpcs3/Emu/Cell/Modules/cellPad.cpp b/rpcs3/Emu/Cell/Modules/cellPad.cpp index 8d230990a2..050aef6170 100644 --- a/rpcs3/Emu/Cell/Modules/cellPad.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPad.cpp @@ -12,15 +12,12 @@ s32 cellPadInit(u32 max_connect) { sys_io.warning("cellPadInit(max_connect=%d)", max_connect); - if (max_connect > CELL_PAD_MAX_PORT_NUM) - return CELL_PAD_ERROR_INVALID_PARAMETER; - const auto handler = fxm::import(Emu.GetCallbacks().get_pad_handler); if (!handler) return CELL_PAD_ERROR_ALREADY_INITIALIZED; - handler->Init(max_connect); + handler->Init(std::min(max_connect, CELL_PAD_MAX_PORT_NUM)); return CELL_OK; }