summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeVerifier.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2022-08-01 12:15:43 +0200
committerJosJuice <josjuice@gmail.com>2022-08-04 22:00:59 +0200
commit02e3125f23c3844a28887289011af36808426196 (patch)
tree3177a808010870ab74fe680df938c76c46c2760f /Source/Core/DiscIO/VolumeVerifier.cpp
parent40a4eb3893ce3cae8a3edcc6356812fdcb98c1b9 (diff)
DiscIO/VolumeVerifier: Small logic cleanup
Just for ease of reading. No behavioral difference.
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeVerifier.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp
index da4acc5af6..f6c2bb20e0 100644
--- a/Source/Core/DiscIO/VolumeVerifier.cpp
+++ b/Source/Core/DiscIO/VolumeVerifier.cpp
@@ -1178,10 +1178,7 @@ void VolumeVerifier::Process()
{
// Don't read beyond the end of the disc.
bytes_to_read -= bytes_over_max;
- if (excess_bytes < bytes_over_max)
- excess_bytes = 0;
- else
- excess_bytes -= bytes_over_max;
+ excess_bytes -= std::min(excess_bytes, bytes_over_max);
content_read = false;
group_read = false;
}