diff --git a/Utilities/File.cpp b/Utilities/File.cpp index 8abd8fb54d..94d3f3f607 100644 --- a/Utilities/File.cpp +++ b/Utilities/File.cpp @@ -1313,8 +1313,7 @@ fs::file::file(const void* ptr, std::size_t size) const s64 new_pos = whence == fs::seek_set ? offset : whence == fs::seek_cur ? offset + m_pos : - whence == fs::seek_end ? offset + size() : - (fmt::raw_error("fs::file::memory_stream::seek(): invalid whence"), 0); + whence == fs::seek_end ? offset + size() : -1; if (new_pos < 0) { @@ -1765,8 +1764,7 @@ fs::file fs::make_gather(std::vector files) const s64 new_pos = whence == fs::seek_set ? offset : whence == fs::seek_cur ? offset + pos : - whence == fs::seek_end ? offset + end : - (fmt::raw_error("fs::gather_stream::seek(): invalid whence"), 0); + whence == fs::seek_end ? offset + end : -1; if (new_pos < 0) { diff --git a/Utilities/File.h b/Utilities/File.h index 36776b6b2e..5c87f8f0d2 100644 --- a/Utilities/File.h +++ b/Utilities/File.h @@ -598,8 +598,7 @@ namespace fs const s64 new_pos = whence == fs::seek_set ? offset : whence == fs::seek_cur ? offset + pos : - whence == fs::seek_end ? offset + size() : - (fmt::raw_error("fs::container_stream<>::seek(): invalid whence"), 0); + whence == fs::seek_end ? offset + size() : -1; if (new_pos < 0) { diff --git a/rpcs3/Crypto/unedat.h b/rpcs3/Crypto/unedat.h index f345d09d7a..0bde5e7104 100644 --- a/rpcs3/Crypto/unedat.h +++ b/rpcs3/Crypto/unedat.h @@ -112,8 +112,7 @@ public: const s64 new_pos = whence == fs::seek_set ? offset : whence == fs::seek_cur ? offset + pos : - whence == fs::seek_end ? offset + size() : - (fmt::raw_error("EDATADecrypter::seek(): invalid whence"), 0); + whence == fs::seek_end ? offset + size() : -1; if (new_pos < 0) { diff --git a/rpcs3/Emu/Cell/lv2/sys_fs.cpp b/rpcs3/Emu/Cell/lv2/sys_fs.cpp index f8ab0a9f96..66092d486e 100644 --- a/rpcs3/Emu/Cell/lv2/sys_fs.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_fs.cpp @@ -181,8 +181,7 @@ struct lv2_file::file_view : fs::file_base const s64 new_pos = whence == fs::seek_set ? offset : whence == fs::seek_cur ? offset + m_pos : - whence == fs::seek_end ? offset + size() : - (fmt::raw_error("lv2_file::file_view::seek(): invalid whence"), 0); + whence == fs::seek_end ? offset + size() : -1; if (new_pos < 0) {