diff --git a/rpcs3/Emu/Cell/Modules/cellGame.cpp b/rpcs3/Emu/Cell/Modules/cellGame.cpp index 822b716bd5..c5cc64bca1 100644 --- a/rpcs3/Emu/Cell/Modules/cellGame.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGame.cpp @@ -964,11 +964,11 @@ error_code cellGameContentErrorDialog(s32 type, s32 errNeedSizeKB, vm::cptr CELL_GAME_ERRDIALOG_NOSPACE); } -s32 cellGameThemeInstall(vm::cptr usrdirPath, vm::cptr fileName, u32 option) +error_code cellGameThemeInstall(vm::cptr usrdirPath, vm::cptr fileName, u32 option) { cellGame.todo("cellGameThemeInstall(usrdirPath=%s, fileName=%s, option=0x%x)", usrdirPath, fileName, option); - if (!fileName || !usrdirPath || !memchr(usrdirPath.get_ptr(), '\0', CELL_GAME_PATH_MAX)) + if (!usrdirPath || !fileName || !memchr(usrdirPath.get_ptr(), '\0', CELL_GAME_PATH_MAX) || option > CELL_GAME_THEME_OPTION_APPLY) { return CELL_GAME_ERROR_PARAM; } @@ -980,6 +980,11 @@ error_code cellGameThemeInstallFromBuffer(u32 fileSize, u32 bufSize, vm::ptr bufSize && !func) || bufSize <= 4095 || option > CELL_GAME_THEME_OPTION_APPLY) + { + return CELL_GAME_ERROR_PARAM; + } + return CELL_OK; }