From 02e3125f23c3844a28887289011af36808426196 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 1 Aug 2022 12:15:43 +0200 Subject: [PATCH] DiscIO/VolumeVerifier: Small logic cleanup Just for ease of reading. No behavioral difference. --- Source/Core/DiscIO/VolumeVerifier.cpp | 5 +---- 1 file changed, 1 insertion(+), 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; }