diff --git a/Utilities/bin_patch.cpp b/Utilities/bin_patch.cpp index 71106f30e1..9449d808c0 100644 --- a/Utilities/bin_patch.cpp +++ b/Utilities/bin_patch.cpp @@ -1732,7 +1732,7 @@ void patch_engine::save_config(const patch_map& patches_map) fs::pending_file file(path); - if (!file.file || file.file.write(out.c_str(), out.size() < out.size() || !file.commit())) + if (!file.file || file.file.write(out.c_str(), out.size()) < out.size() || !file.commit()) { patch_log.error("Failed to create patch config file %s (error=%s)", path, fs::g_tls_error); } diff --git a/rpcs3/Emu/Cell/Modules/cellMusicSelectionContext.cpp b/rpcs3/Emu/Cell/Modules/cellMusicSelectionContext.cpp index e9360ebf6e..ae578d2329 100644 --- a/rpcs3/Emu/Cell/Modules/cellMusicSelectionContext.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMusicSelectionContext.cpp @@ -145,7 +145,7 @@ void music_selection_context::create_playlist(const std::string& new_hash) fs::pending_file file(yaml_path); - if (!file.file || file.file.write(out.c_str(), out.size() < out.size() || !file.commit())) + if (!file.file || file.file.write(out.c_str(), out.size()) < out.size() || !file.commit()) { cellMusicSelectionContext.error("create_playlist: Failed to create music playlist file '%s' (error=%s)", yaml_path, fs::g_tls_error); } diff --git a/rpcs3/rpcs3qt/patch_manager_dialog.cpp b/rpcs3/rpcs3qt/patch_manager_dialog.cpp index 8ece486aee..d823ee647d 100644 --- a/rpcs3/rpcs3qt/patch_manager_dialog.cpp +++ b/rpcs3/rpcs3qt/patch_manager_dialog.cpp @@ -1279,7 +1279,7 @@ bool patch_manager_dialog::handle_json(const QByteArray& data) // Overwrite current patch file fs::pending_file patch_file(path); - if (!patch_file.file || (patch_file.file.write(content), !patch_file.commit())) + if (!patch_file.file || !patch_file.file.write(content) || !patch_file.commit()) { patch_log.error("Could not save new patches to %s (error=%s)", path, fs::g_tls_error); return false;