summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeVerifier.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2022-02-18 21:05:42 +0100
committerGitHub <noreply@github.com>2022-02-18 21:05:42 +0100
commit35b436bd6b17fb5903e534975f81cf6f6d8b08e2 (patch)
tree2f171b7cbcf095129460ddec06fc8cc968799490 /Source/Core/DiscIO/VolumeVerifier.cpp
parent92455f7cefc9094c6f80f3d446aa56c452460a72 (diff)
parentd2ebbfb91a7d50b0db12010392a594c12bbf1c44 (diff)
Merge pull request #10377 from Pokechu22/warning-fixes-jan-2022
Fix several compile warnings on GCC
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeVerifier.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp
index 252cf427b6..593fb49b33 100644
--- a/Source/Core/DiscIO/VolumeVerifier.cpp
+++ b/Source/Core/DiscIO/VolumeVerifier.cpp
@@ -1113,10 +1113,11 @@ void VolumeVerifier::Process()
bytes_to_read = Common::AlignUp(content.size, 0x40);
content_read = true;
- if (m_content_index + 1 < m_content_offsets.size() &&
- m_content_offsets[m_content_index + 1] < m_progress + bytes_to_read)
+ const u16 next_content_index = m_content_index + 1;
+ if (next_content_index < m_content_offsets.size() &&
+ m_content_offsets[next_content_index] < m_progress + bytes_to_read)
{
- excess_bytes = m_progress + bytes_to_read - m_content_offsets[m_content_index + 1];
+ excess_bytes = m_progress + bytes_to_read - m_content_offsets[next_content_index];
}
}
else if (m_content_index < m_content_offsets.size() &&