Merge pull request #14825 from DacoTaco/fixes/Ancast

DolReader: correctly save section index of ancast
This commit is contained in:
JosJuice
2026-08-25 21:24:09 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ bool DolReader::Initialize(std::span<const u8> buffer)
section.m_address == ESPRESSO_ANCAST_LOCATION_VIRT &&
Common::swap32(section.m_data.data()) == ANCAST_MAGIC)
{
m_ancast_index = i;
m_ancast_index = m_sections.size() - 1;
}
}

View File

@@ -70,7 +70,7 @@ private:
bool m_is_valid;
bool m_is_wii;
std::optional<u8> m_ancast_index;
std::optional<std::size_t> m_ancast_index;
// Copy sections to internal buffers
bool Initialize(std::span<const u8> buffer);