mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-20 11:03:56 +00:00
fix: prevent crash when detecting newer updates in NCA integrity verification
- Change storage assignment from SetDataStorage() method to direct array indexing to prevent crashes when newer game updates are detected. - The previous method was incorrectly handling storage info assignment for integrity verification layers. Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "core/file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h"
|
||||
@@ -1251,8 +1252,8 @@ Result NcaFileSystemDriver::CreateIntegrityVerificationStorageImpl(
|
||||
R_UNLESS(last_layer_info_offset + layer_info.size <= layer_info_offset,
|
||||
ResultRomNcaInvalidIntegrityLayerInfoOffset);
|
||||
}
|
||||
storage_info.SetDataStorage(std::make_shared<OffsetVfsFile>(
|
||||
std::move(base_storage), layer_info.size, last_layer_info_offset));
|
||||
storage_info[level_hash_info.max_layers - 1] = std::make_shared<OffsetVfsFile>(
|
||||
std::move(base_storage), layer_info.size, last_layer_info_offset);
|
||||
|
||||
// Make the integrity romfs storage.
|
||||
auto integrity_storage = std::make_shared<IntegrityRomFsStorage>();
|
||||
|
||||
Reference in New Issue
Block a user