diff options
author | bunnei <bunneidev@gmail.com> | 2021-03-03 02:48:02 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-03-03 02:48:02 +0100 |
commit | 50ee9c46ab47da55ec6fb6976360ac9bd71c13d7 (patch) | |
tree | bdcddc384f0ab2ca0600fdf013d8bc0cadcb1cba | |
parent | video_core: rasterizer_accelerated: Improve error handling & fix implicit conversion. (diff) | |
download | yuzu-50ee9c46ab47da55ec6fb6976360ac9bd71c13d7.tar yuzu-50ee9c46ab47da55ec6fb6976360ac9bd71c13d7.tar.gz yuzu-50ee9c46ab47da55ec6fb6976360ac9bd71c13d7.tar.bz2 yuzu-50ee9c46ab47da55ec6fb6976360ac9bd71c13d7.tar.lz yuzu-50ee9c46ab47da55ec6fb6976360ac9bd71c13d7.tar.xz yuzu-50ee9c46ab47da55ec6fb6976360ac9bd71c13d7.tar.zst yuzu-50ee9c46ab47da55ec6fb6976360ac9bd71c13d7.zip |
-rw-r--r-- | src/video_core/rasterizer_accelerated.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/rasterizer_accelerated.cpp b/src/video_core/rasterizer_accelerated.cpp index f684cd7e5..4fd57d7c7 100644 --- a/src/video_core/rasterizer_accelerated.cpp +++ b/src/video_core/rasterizer_accelerated.cpp @@ -20,10 +20,10 @@ void RasterizerAccelerated::UpdatePagesCachedCount(VAddr addr, u64 size, int del for (auto page = addr >> Core::Memory::PAGE_BITS; page != page_end; ++page) { auto& count = cached_pages.at(page >> 3).Count(page); - if (delta < 0) { - ASSERT_MSG(count > 0, "Count may underflow!"); - } else if (delta > 0) { + if (delta > 0) { ASSERT_MSG(count < UINT8_MAX, "Count may overflow!"); + } else if (delta < 0) { + ASSERT_MSG(count > 0, "Count may underflow!"); } else { ASSERT_MSG(true, "Delta must be non-zero!"); } |