From a9d24b0df36b7e3bb5e8f5e71f3b6a9a2485f44b Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 12 Mar 2021 21:52:49 -0800 Subject: video_core: rasterizer_accelerated: Fix un/signed mismatch. --- src/video_core/rasterizer_accelerated.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/video_core') diff --git a/src/video_core/rasterizer_accelerated.cpp b/src/video_core/rasterizer_accelerated.cpp index 4fd57d7c7..62d84c0f8 100644 --- a/src/video_core/rasterizer_accelerated.cpp +++ b/src/video_core/rasterizer_accelerated.cpp @@ -28,7 +28,8 @@ void RasterizerAccelerated::UpdatePagesCachedCount(VAddr addr, u64 size, int del ASSERT_MSG(true, "Delta must be non-zero!"); } - count += static_cast(delta); + // Adds or subtracts 1, as count is a unsigned 8-bit value + count += static_cast(delta); // Assume delta is either -1 or 1 if (count == 0) { -- cgit v1.2.3