From e8d76ede14abd768b873af6099fdb0f3a779537e Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Mon, 1 May 2017 21:34:50 +0300 Subject: [PATCH] sys_fs_fsync fix --- rpcs3/Emu/Cell/lv2/sys_fs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_fs.cpp b/rpcs3/Emu/Cell/lv2/sys_fs.cpp index 7da6e2558c..d6787e1e13 100644 --- a/rpcs3/Emu/Cell/lv2/sys_fs.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_fs.cpp @@ -1020,7 +1020,7 @@ error_code sys_fs_fdatasync(u32 fd) const auto file = idm::get(fd); - if (!file) + if (!file || !(file->flags & CELL_FS_O_ACCMODE)) { return CELL_EBADF; } @@ -1036,7 +1036,7 @@ error_code sys_fs_fsync(u32 fd) const auto file = idm::get(fd); - if (!file) + if (!file || !(file->flags & CELL_FS_O_ACCMODE)) { return CELL_EBADF; }