From 435ea8d55379a887442916ff309c6f1e28fc9652 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sun, 14 Jan 2018 22:16:48 +0300 Subject: [PATCH] Fix "cellGame: cellGameDataCheck arg validate" Fixes #4058 --- rpcs3/Emu/Cell/Modules/cellGame.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellGame.cpp b/rpcs3/Emu/Cell/Modules/cellGame.cpp index 0b6e044473..0db464b3df 100644 --- a/rpcs3/Emu/Cell/Modules/cellGame.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGame.cpp @@ -319,9 +319,9 @@ error_code cellGameDataCheck(u32 type, vm::cptr dirName, vm::ptr= 3) || (dirName == vm::null)) + if ((type - 1) >= 3 || (type != CELL_GAME_GAMETYPE_DISC && !dirName)) { - return CELL_GAME_ERROR_PARAM; + return {CELL_GAME_ERROR_PARAM, type}; } if (size)