From b24cc78cecc11459cb7bf8a33fa69a73ea34b173 Mon Sep 17 00:00:00 2001 From: ManDude <7569514+ManDude@users.noreply.github.com> Date: Tue, 26 Oct 2021 00:12:54 +0100 Subject: [PATCH] Fix first 3 audios being discarded + move some redundant code (#937) --- decompiler/data/streamed_audio.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/decompiler/data/streamed_audio.cpp b/decompiler/data/streamed_audio.cpp index 2f6945e4c7..77cc58af6a 100644 --- a/decompiler/data/streamed_audio.cpp +++ b/decompiler/data/streamed_audio.cpp @@ -118,12 +118,12 @@ AudioDir read_audio_dir(const std::string& path) { for (auto c : entries[i].name) { // padded with spaces, no null terminator. e.name.push_back(c); - e.start_byte = AUDIO_PAGE_SIZE * entries[i].value; - if (i + 1 < (entries.size())) { - e.end_byte = AUDIO_PAGE_SIZE * entries[i + 1].value; - } else { - e.end_byte = -1; - } + } + e.start_byte = AUDIO_PAGE_SIZE * entries[i].value; + if (i + 1 < (entries.size())) { + e.end_byte = AUDIO_PAGE_SIZE * entries[i + 1].value; + } else { + e.end_byte = -1; } result.entries.push_back(e); } @@ -204,7 +204,7 @@ void process_streamed_audio(const std::string& dir, const std::vector