From a8cc19deccdb53f555f900c4c71d9356e5eab480 Mon Sep 17 00:00:00 2001 From: DacoTaco Date: Mon, 24 Aug 2026 15:05:42 +0200 Subject: [PATCH] DolReader: correctly save section index of ancast --- Source/Core/Core/Boot/DolReader.cpp | 2 +- Source/Core/Core/Boot/DolReader.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Boot/DolReader.cpp b/Source/Core/Core/Boot/DolReader.cpp index 8abf98fb7f..a374ec02d0 100644 --- a/Source/Core/Core/Boot/DolReader.cpp +++ b/Source/Core/Core/Boot/DolReader.cpp @@ -116,7 +116,7 @@ bool DolReader::Initialize(std::span 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; } } diff --git a/Source/Core/Core/Boot/DolReader.h b/Source/Core/Core/Boot/DolReader.h index 1332ae0661..5a02da4070 100644 --- a/Source/Core/Core/Boot/DolReader.h +++ b/Source/Core/Core/Boot/DolReader.h @@ -70,7 +70,7 @@ private: bool m_is_valid; bool m_is_wii; - std::optional m_ancast_index; + std::optional m_ancast_index; // Copy sections to internal buffers bool Initialize(std::span buffer);