diff options
| author | 2018-12-11 20:27:37 -0500 | |
|---|---|---|
| committer | 2018-12-11 20:27:37 -0500 | |
| commit | 785d6f9ce09b0dcd39cc93ddbbd98afa2e906ef5 (patch) | |
| tree | a3e411c1346f577c7fd976d2f73d827003fe820d /src/core | |
| parent | Merge pull request #1877 from heapo/audio_interp (diff) | |
| parent | patch_manager: Prevent use of a dangling pointer within PatchRomFS (diff) | |
| download | yuzu-785d6f9ce09b0dcd39cc93ddbbd98afa2e906ef5.tar.gz yuzu-785d6f9ce09b0dcd39cc93ddbbd98afa2e906ef5.tar.xz yuzu-785d6f9ce09b0dcd39cc93ddbbd98afa2e906ef5.zip | |
Merge pull request #1895 from lioncash/uninit
patch_manager: Prevent use of a dangling pointer within PatchRomFS
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/file_sys/patch_manager.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index ecdc21c87..61706966e 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp | |||
| @@ -286,13 +286,12 @@ static void ApplyLayeredFS(VirtualFile& romfs, u64 title_id, ContentRecordType t | |||
| 286 | VirtualFile PatchManager::PatchRomFS(VirtualFile romfs, u64 ivfc_offset, ContentRecordType type, | 286 | VirtualFile PatchManager::PatchRomFS(VirtualFile romfs, u64 ivfc_offset, ContentRecordType type, |
| 287 | VirtualFile update_raw) const { | 287 | VirtualFile update_raw) const { |
| 288 | const auto log_string = fmt::format("Patching RomFS for title_id={:016X}, type={:02X}", | 288 | const auto log_string = fmt::format("Patching RomFS for title_id={:016X}, type={:02X}", |
| 289 | title_id, static_cast<u8>(type)) | 289 | title_id, static_cast<u8>(type)); |
| 290 | .c_str(); | ||
| 291 | 290 | ||
| 292 | if (type == ContentRecordType::Program || type == ContentRecordType::Data) | 291 | if (type == ContentRecordType::Program || type == ContentRecordType::Data) |
| 293 | LOG_INFO(Loader, log_string); | 292 | LOG_INFO(Loader, "{}", log_string); |
| 294 | else | 293 | else |
| 295 | LOG_DEBUG(Loader, log_string); | 294 | LOG_DEBUG(Loader, "{}", log_string); |
| 296 | 295 | ||
| 297 | if (romfs == nullptr) | 296 | if (romfs == nullptr) |
| 298 | return romfs; | 297 | return romfs; |